How a redirect works
When a browser asks for an address, the server can answer that the page has moved and give a new address. The browser then loads the new one. The visitor usually notices nothing, except that the address bar has changed.
A redirect is also called page forwarding or URL forwarding. When people say a site "redirected" them, this is what happened: they asked for one address and were sent on to another.
The server's answer starts with a three-digit status code. The first lines of a permanent redirect look like this:
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/services
301 is the status code and Location is the new address. Search engines read the same answer, so a redirect moves visitors and search results at the same time.
An example
You rename a page from /services-2019 to /services. Other sites link to the old address, and each backlink still points there. Some visitors have it bookmarked. Without a redirect, all of them land on an error page. With a 301 redirect, they land on the new page, and search engines learn that the new address has taken over from the old one.
Moving a site from http to HTTPS works the same way: every old address redirects to its secure version. So does moving to a new domain, where each old page should redirect to the matching page on the new domain.
More redirect examples, all permanent (301):
- Renamed post:
/blog/seo-tips-2024to/blog/seo-tips. - Moved to HTTPS:
http://example.comtohttps://example.com. - Closed product:
/shop/red-mugto/shop/mugs, the closest category. - Merged pages: two short guides on the same topic become one, and the weaker address redirects to the stronger one.
Types of redirect
| Code | Name | Use it when |
|---|---|---|
| 301 | Moved permanently | A page has moved for good. The usual choice. |
| 308 | Permanent redirect | The same as 301, but forms keep their method. Rarely needed on content sites. |
| 302 | Found | A page is away for a short time, such as during a sale. |
| 307 | Temporary redirect | The same as 302, but forms keep their method. |
The difference that matters for search is permanent or temporary. With a permanent redirect, search engines replace the old address with the new one over time. With a temporary one, they usually keep showing the old address, because you have said it will come back. If you use 302 for a move that is really permanent, Google may eventually treat it as permanent anyway, but the switch is slower and less predictable.
Two other kinds exist. A meta refresh is a tag in the page that tells the browser to load another address after a delay, and a JavaScript redirect does the same with a script. Google can follow both, but a server redirect is faster and clearer, so use it whenever you can.
Why it matters
- Visitors do not hit dead ends. Old links, bookmarks and printed addresses keep working.
- The work on the old page is not lost. A permanent redirect tells search engines which page replaces it, so the links and signals the old page earned carry over.
- Chains slow pages down. If one redirect leads to another, each step adds waiting time before the page starts to load, and search engines may stop following after several hops. Point every old address straight at the final one.
- Loops break pages. If page A redirects to B and B redirects back to A, the browser gives up with an error.
How to set one up
Most site builders and SEO plugins have a redirects screen where you enter the old path and the new one. If you manage the server yourself, a permanent redirect is one line.
On an Apache server, in the .htaccess file:
Redirect 301 /services-2019 /services
On an nginx server, inside the site's configuration:
location = /services-2019 { return 301 /services; }
After adding a redirect, update your own links so they point at the new address directly instead of relying on the redirect.
How to check yours
- Type the old address into your browser and press Enter.
- Look at the address bar. Did you land on the page you expected?
- To see the status code, paste the old address into the redirect checker. It shows every hop with its code, and flags chains and loops. In your browser, the developer tools show the same: open the Network tab, reload and click the first request.
- Open the redirect settings in your site builder. For a move that will stay, pick the 301 or "permanent" option.
- Update your own links and your XML sitemap so they use the final address, not the old one.
Then run the free audit on the final address to check the rest of the page.