What a redirect is and why you need it
A redirect is an automatic jump from one address to another. The visitor does not notice it, while the search engine gets a signal: the page has moved, so transfer rankings and links to the new address.
You need it when addresses change, pages are merged, you switch to https, choose the main version of the site and during a redesign. Without redirects, old addresses become errors and you have to earn your rankings again.
Which code to choose
- 301: permanent
- The main option. The page has moved for good, and rankings and link weight pass to the new address.
- 302: temporary
- For promotions and maintenance, when the old address will return. Not suitable for a move.
- 404: page not found
- An honest answer that the address does not exist. Use it when there is no replacement.
- 410: permanently removed
- Tells the search engine more strongly than 404 that the page was removed on purpose. Rarely used.
How to move pages
Collect a list of old addresses
Export pages from Search Console, Metrica and a crawler. Do not forget addresses that other sites link to.
Map them to new ones
For each old address, find the closest page in meaning. The "old to new" table is the main document of the move.
Set up the redirects
Preferably at the server level, not with browser scripts. Avoid chains: old, intermediate, new.
Check response codes
Spot-check or use a crawler to make sure every address returns 301 and goes straight to the target.
Update internal links
The menu, articles and sitemap should point to the new addresses directly.
A good 404 helps you sell
Style the page to match the site, explain that the address was not found and offer search, the main sections and a phone number. Someone who mistyped an address is not yet lost as a customer.
Common mistakes
- All deleted pages are redirected to the home page
- A 302 redirect instead of 301 during a move
- Chains of three or four hops in a row
- The 404 page returns code 200, so empty "live" pages appear in search
- A redirect leads to a page that itself returns an error
- Redirects from the version without a trailing slash or with www are forgotten
- The sitemap was not updated after the addresses changed
How to find broken links
Open the error pages report in Search Console, and also Metrica: the page URLs section will show where people came to and where they got a 404. A site crawler will list internal links that lead nowhere.
Fix first the addresses that have external links or used to have traffic. Errors caused by random typos from outsiders do no harm.
Redirects when changing domains and during a redesign
Changing domains is the most sensitive case. All pages of the old site must redirect to the corresponding pages of the new one with a 301, not to the home page. You also need to report the address change in Search Console and update the sitemap, social media links and map listings.
In a redesign without a domain change, the key is to keep the addresses of important pages. If the new structure requires different addresses, make a mapping table in advance and test it on a staging server. After launch, watch errors in Search Console for the first two to three weeks and quickly fix whatever you missed.