Redirects are a approach of transferring a webpage customer from an previous deal with to a brand new one with out additional motion from them. Every webpage has a novel reference, a URL, to allow browsers to request the proper data be returned.
If a browser requests a web page that has a redirect on it, it will likely be instructed to go to a special deal with. Which means that the content material on the unique web page is now not accessible to request, and the browser should go to the brand new web page to request the content material there as a substitute.
Primarily, redirects are directions given to browsers or bots that the web page they’re in search of can now not be reached they usually should go to a special one as a substitute.
Sorts of redirects
A web site can point out {that a} useful resource is now not accessible on the earlier deal with in a number of methods.
Everlasting and momentary
When figuring out {that a} redirect has been positioned on a URL, search engines like google should resolve whether or not to start serving the brand new URL as a substitute of the unique within the search outcomes.
Google claims it determines whether or not the redirect will likely be a everlasting addition to the URL or only a momentary change within the location of the content material.
If Google determines that the redirect is barely momentary, it should seemingly proceed to indicate the unique URL within the search outcomes. If it determines that the redirect is everlasting, the brand new URL will start to look within the search outcomes.
Meta refresh
A meta refresh redirect is a client-side redirect. Which means that when a customer to a web site encounters a meta redirect, it will likely be their browser that identifies the necessity to go to a special web page (not like server-side redirects, the place the server instructs the browser to go to a special web page).
Meta refreshes can occur immediately or with a delay. A delayed meta refresh typically accompanies a pop-up message like “you can be redirected in 5 seconds”.
Google claims it treats instantaneous meta refreshes as “everlasting” redirects, and delayed meta refreshes as “momentary” redirects.
JavaScript redirect
A redirect that makes use of JavaScript to take customers from one web page to a different can be an instance of a client-side redirect. Google warns website managers to solely use JavaScript redirects if they will’t use server-side redirects or meta-refresh redirects.
Primarily, search engines like google might want to render the web page earlier than choosing up the JavaScript redirect. This could imply there could also be situations the place the redirect is missed.
Server-side redirects
By far, the most secure methodology for redirecting URLs is server-side redirects.
This requires entry to the web site’s server configuration, which is why meta refreshes are typically most well-liked. If you happen to can entry your server’s config information, then you’ll have a number of choices accessible.
The important thing variations in these standing codes are whether or not they point out the redirect is everlasting or momentary and whether or not the request methodology of POST (used to ship information to a server) or GET (used to request information from a server) could be modified.
For a extra complete overview of POST and GET and why they matter for various purposes, see the W3schools explanation.
Everlasting redirects
- 301 (moved completely): A redirect that returns a HTTP standing code of “301” signifies that the useful resource discovered on the unique URL has completely moved to the brand new one. It won’t revert to the previous URL and it permits the unique request methodology to alter from POST to GET.
- 308 (everlasting redirect): A 308 server response code is much like 301 in that it signifies that the useful resource discovered on the unique URL has completely moved to the brand new one. Nonetheless, the important thing distinction between the 308 and the 301 is that it recommends sustaining the unique request methodology of POST or GET.
Short-term redirects
- 302 – discovered (briefly displaced): A 302 server code signifies that the transfer from one URL to a different is barely momentary. It’s seemingly the redirect will likely be eliminated in some unspecified time in the future within the close to future. As with the 301 redirect, browsers can use a special request methodology from the unique (POST or GET).
- 307 (momentary redirect): A 307 server code additionally signifies {that a} redirect is momentary, however as with a 308 redirect it recommends retaining the request methodology of the unique URL.
Why use redirects
There are a number of good causes to make use of redirects. Similar to you may ship out change-of-address playing cards when transferring home (nicely, again within the early 2000s anyway, I’m unsure the way you children do it now), URL redirects assist make sure that vital guests don’t get misplaced.
Human web site customers
A redirect implies that when accessing content material in your web site a human customer is taken mechanically to the extra related web page.
For instance, a customer might have bookmarked your URL previously. They then click on on the bookmark with out realizing the URL has modified. With out the redirect, they might find yourself on a web page with a 404 error code and no approach of figuring out how you can get to the content material they’re after.
A redirect means you would not have to depend on guests understanding how you can navigate to the brand new URL. As a substitute, they’re mechanically taken to the proper web page. That is a lot better for consumer expertise.
Engines like google
Just like human customers, when a search engine bot hits a redirect, it’s taken to the brand new URL.
As a substitute of leaving them on a 404 error web page, it will probably establish the equal URL straightaway, negating the necessity for the search bot to attempt to establish the place, if anyplace, that unique URL’s content material may now be housed.
Demonstrating equivalence
Engines like google will use redirects to find out if they need to proceed displaying the unique URL within the search outcomes.
If there is no such thing as a redirect from an previous, defunct URL to the brand new one, then the various search engines will seemingly simply de-index the previous URL because it has no worth as a 404 web page. With a redirect in place, nonetheless, the search engine can instantly hyperlink the brand new URL to the previous one.
- Whether it is redirected completely, the search engine will seemingly start to show the brand new URL within the search outcomes.
- If it’s a momentary redirect, they might proceed to show the previous one. Google and different search engines like google might cross a few of the rating alerts from the previous URL to the brand new one because of the redirect.
This solely occurs in the event that they imagine the brand new web page to be the equal of the previous one when it comes to worth to searchers.
There are situations the place this won’t be the case, nonetheless, often as a result of the redirects have been applied incorrectly. Extra on that later.
Typical search engine marketing use instances for redirects
There are some quite common the reason why an internet site proprietor may need to implement redirects to assist each customers and search engines like google discover content material. Importantly for SEO, redirects can permit the brand new web page to retain a few of the rating energy of the previous one.
Vainness URLs
Vainness URLs are sometimes used to assist individuals bear in mind URLs. For instance, a TV advert may inform viewers to go to www.example-competition.com to enter their competitors.
This URL may redirect to www.instance.com/competitions/tv-ad-2024, which is way more durable for viewers to recollect and enter appropriately. Utilizing a conceit URL like this implies web site house owners can use brief URLs which can be simple to recollect and spell with out having to arrange the content material exterior of their present web site construction.
URL rewrites
There could also be situations when a URL must be edited as soon as it’s already dwell.
For instance, maybe a product identify has modified, a spelling mistake has been observed, or a date within the URL must be up to date. In these instances, a redirect from the previous URL to the brand new one will guarantee guests and search bots can simply discover the brand new deal with.
Transferring content material
Restructuring your web site may necessitate redirects.
For instance, chances are you’ll be merging subfolders or transferring content material from one subdomain to a different. This may be a good time to make use of redirects to make sure that content material is well accessible.
Transferring domains
Web site migrations, like transferring from one area deal with to a different, are traditional makes use of of redirects. These are typically finished en masse, typically with each URL within the web site requiring a redirect.
This could occur in internationalization, like transferring an internet site from a .co.uk ccTLD to a .com deal with. It may also be necessitated by way of an organization rebrand or the acquisition of one other web site and a need to merge it with the present one.
There might even be a necessity to separate an internet site into separate domains. All of those instances can be good candidates for redirects.
HTTP to HTTPS
Not as widespread now the web has largely woken as much as the necessity for safety is the migration from HTTP to HTTPS.
You continue to may want to change a web site from an insecure protocol (HTTP) to a safe one (HTTPS) in some conditions. This can seemingly require redirects throughout all the web site.
Dig deeper: What is technical SEO?
Redirect issues to keep away from
The principle consideration when implementing redirects is which sort to make use of.
Normally, server-side redirects are typically most secure to make use of. Nonetheless, the selection between everlasting and momentary redirects is dependent upon your particular scenario.
There are extra potential pitfalls to concentrate on.
Loops
Redirect loops occur when two redirects instantly contradict one another. For instance, URL A is redirected to URL B; nonetheless, URL B has a redirect pointing to URL A. This makes it unclear which web page is meant to be visited.
Engines like google gained’t be capable to decide which web page is supposed to be canonical and human guests will be unable to entry both web page.
If a redirect loop is current on a web site, you’ll encounter a message just like the one beneath while you attempt to entry one of many pages within the loop:

To repair this error, take away the redirects inflicting the loop and level them to the proper pages.
Chains
A redirect chain is a collection of pages that redirect from one to a different. For instance, URL A redirects to URL B, which redirects to URL C, which redirects to URL D. This isn’t an excessive amount of of a difficulty except the chain will get too huge.
URL chains can begin to have an effect on load velocity. John Mueller, Search Advocate at Google, has additionally stated previously that:
- “The one factor I’d be careful for is that you’ve got lower than 5 hops for URLs which can be often crawled. With a number of hops, the primary impact is that it’s a bit slower for customers. Engines like google simply comply with the redirect chain (for Google: as much as 5 hops within the chain per crawl try).”
Comfortable 404s
One other drawback that may come up from utilizing redirects incorrectly is that search engines like google might not take into account the redirect to be legitimate for the needs of rankings.
For instance, if Web page A redirects to Web page B however the two usually are not comparable in content material, the various search engines might not cross any of the worth of Web page A to Web page B. This may be reported as a “gentle 404” in Google Search Console.
This sometimes occurs when a webpage (e.g., a product web page) is deleted and the URL is redirected to the homepage.
Anybody clicking on the product web page from search outcomes wouldn’t discover the product data they have been anticipating in the event that they landed on the homepage.
The alerts and worth of the unique web page gained’t essentially be handed to the homepage if it doesn’t match the user intent of searchers.
Ignoring earlier redirects
It may be a mistake to not take into account beforehand applied redirects. With out checking to see what redirects are already energetic on the location, chances are you’ll run the chance of making loops or chains.
Frequent adjustments
One more reason for planning redirects upfront is to restrict the necessity to often change them. It is crucial from an inside productiveness perspective, particularly if you happen to contain different groups of their implementation.
Most crucially, although, is that you could be discover the various search engines battle to maintain up with frequent adjustments, particularly if you happen to incorrectly counsel the redirect is everlasting through the use of a 301 or 308 standing code.
Get the day by day e-newsletter search entrepreneurs depend on.
Good observe for redirects
It’s useful when contemplating any exercise involving redirects to do the next to forestall issues down the street.
Create a redirect map
A redirect map is an easy plan exhibiting which URLs ought to redirect and their locations. It may be so simple as a spreadsheet with a column of “from” URLs and “to” URLs.
This fashion, you will have a transparent visible of what redirects will likely be applied and you may establish any points or conflicts beforehand.
Dig deeper: How to speed up site migrations with AI-powered redirect mapping
Assess present redirects
If you happen to maintain a working redirect map, look again at earlier redirects to see in case your new ones will influence them in any respect.
For instance, would you create a redirect chain or loop by including new redirects to a web page that already is redirected from one other? This may also allow you to see when you’ve got moved a web page to a brand new URL a number of instances over a brief time frame.
If you happen to would not have a map of earlier redirects, you could possibly pull redirects out of your server configuration information (or at the least ask somebody with entry to it if they will!)
If you happen to would not have entry to the server configuration information both, or your redirects are applied client-side, you may strive the next methods:
- Run your web site by way of a crawling software: Crawling instruments mimic search bots in that they comply with hyperlinks and different alerts on an internet site to find all its pages. Many may also report again on the standing code or if a meta refresh is detected on the URLs they discover. Screaming Frog has a guide for detecting redirects utilizing its software.
- Use a plug-in: There are various browser plugins that may present if a web page you’re visiting has a redirect. They don’t are likely to allow you to establish site-wide redirects, however they are often useful for spot-checking a web page.
- Use Chrome Developer Instruments: One other approach, which simply requires a Chrome browser, is to go to the web page you’re checking and use Chrome Developer Instruments to establish if there’s a redirect on it. You merely go to the Community panel to see what the response codes are for every aspect of the web page. For extra particulars, take a look at this guide by Aleyda Solis.
Google Search Console
The Protection tab in Google Search Console lists errors discovered by Google that will forestall indexing.
Right here, you might even see examples of pages which have redirect errors. These are defined in additional element in Google’s Search Console Assist part on Indexing reasons.
Options to redirects
There are some events when redirects won’t be attainable in any respect. This tends to be when there’s a restrict to what could be achieved by way of a CMS or with inside sources.
In these situations, options could possibly be thought of. Nonetheless, they might not obtain precisely what you’ll need from a redirect.
Canonical tags
To assist rank a brand new web page over the previous one, you may want to make use of a canonical tag if redirects usually are not attainable.
For instance, you could have two equivalent URLs: Web page A and Web page B. Web page B is new, however you need that to be what customers discover after they search with related search phrases in Google. You don’t want Web page A to be served as a search outcome anymore.
Usually, you’ll simply add a redirect from Web page A to Web page B so customers couldn’t entry Web page A from the SERPs. If you happen to can not add redirects, you need to use a canonical tag to point to search engines like google that Web page B needs to be served as a substitute of Web page A.
If URL A has been changed by URL B they usually each have equivalent content material, Google might belief your canonical tag if all different alerts additionally level to Web page B being the brand new canonical model of the 2.
Crypto redirects
A crypto redirect isn’t actually a redirect in any respect. It’s really a hyperlink on the web page you’ll need to have redirected, directing customers to the brand new web page. Primarily it acts as a signpost.
For instance, a name to motion like, “This web page has moved. Discover it at its new location.” with the textual content linking to the content material’s new URL.
Crypto redirects require customers to hold out an motion and won’t work as a redirect for search engines like google, however if you’re actually struggling to implement a redirect and a change of deal with for content material has occurred, this can be your solely choice to hyperlink one web page to the opposite.
Conclusion
Redirects are helpful instruments for informing customers and search engines like google that content material has moved location. They assist search engines like google perceive the relevance of a brand new web page to the previous one whereas eradicating the requirement for customers to find the brand new content material.
- Used correctly, redirects can help usability and search rankings.
- Used incorrectly, they will result in issues with parsing, indexing and serving your web site’s content material.
Opinions expressed on this article are these of the visitor creator and never essentially Search Engine Land. Employees authors are listed here.