How to Set Up 301 Redirects During a Website Migration?

Publish date:Nov 17, 2026
Author:Easy Yingbao (Eyingbao)
Page views:
  • How to Set Up 301 Redirects During a Website Migration?
How to Set Up 301 Redirects Correctly During a Website Migration? This article covers the key steps, from organizing old URLs and mapping pages one to one to configuring redirects on your server and website platform. Learn how to check redirect chains, language versions, tracking parameters, and forms, and how to maintain your old domain over time. This helps reduce the impact of incorrect redirects on visitor experience and marketing conversions, making your new site launch smoother.
Inquire now : 4006552477

During a website migration, a 301 redirect uses the HTTP 301 status code to permanently redirect an old URL to its corresponding new URL. The most important thing when setting one up is not to make sure that every old link redirects, but to ensure that each old page leads to a new page with relevant content wherever possible, and to check that the redirect occurs only once.

For example, an old product page should redirect to the new page for that product, rather than sending every visitor to the homepage. This way, visitors arriving from search results, ads, or saved bookmarks can still find the content they were looking for; search engines can also more clearly identify the change in the page URL. However, a 301 redirect cannot guarantee that rankings or traffic will be completely unaffected by a migration.

First, organize the old URLs and decide where each page should go

Before configuring anything, create a URL mapping document that includes, at a minimum, the old URL, the new URL, the page type, and the check result. Collect old URLs from the current site's page inventory, sitemap, search performance reports, server logs, and landing pages currently used in ads and on social media. Don't check only the main navigation: product detail pages, articles, download pages, and past campaign pages may still receive visits.

When organizing URLs, decide how to handle each page based on its content:

  • Content retained, but URL changed: Redirect the old page one-to-one to its corresponding new page.
  • Multiple old pages consolidated: Redirect each page to a new page that can accommodate its original content, so visitors can still find relevant information.
  • Page deleted with no suitable replacement: Returning a 404 or 410 status code is more appropriate than forcing a redirect to the homepage.
  • Page change is temporary: Use a temporary redirect, such as a 302, as appropriate instead of configuring a temporary change as a permanent migration.

For multilingual websites, also check the language and region: an old German page should preferably point to its corresponding new German page, and the same applies to English pages. If the new site has no page in the corresponding language, choose the replacement page with the closest content and audience. Don't point to an unrelated page just to maintain a redirect.

How to Set Up 301 Redirects During a Website Migration?

Choose where to configure 301 redirects

Common places to configure redirects include the server, the website administration panel, a redirect management feature in the website-building platform, or a reverse proxy or CDN. The specific option depends on how the website is deployed. Before migrating, find out which service handles requests to the old domain and which layer can return the redirect. Configuring the same rule in multiple places can cause rules to overwrite each other or create loops.

For a small number of pages with changed URLs, configuring redirects individually is usually easier to check. For example, redirect https://old.example.com/products/a to https://www.example.com/products/a. This approach is suitable for product pages, articles, and marketing landing pages whose URL paths have changed in different ways.

When changing the domain for the entire site while keeping the paths the same, consider using a rule that preserves the path, so that /products/a under the old domain automatically redirects to the same path under the new domain. Before using this approach, make sure the corresponding pages actually exist on the new site. Set up more specific rules separately for pages whose paths have changed, and check the order in which the rules are matched.

If you use a SaaS website-building platform, check whether the administration panel lets you map old paths to new URLs and whether you can import mappings in bulk. When migrating platforms, also confirm which party is responsible for redirects once the old domain is connected. Don't assume that old pages have been set up with 301 redirects just because the domain's DNS records have been configured.

Follow this order for checks before and after launch

  1. Prepare the new site pages first. Make sure the target pages are accessible and that their content, language, product information, and inquiry options are ready. Redirecting to a page that doesn't exist or hasn't been published only transfers the problem from the old site to the new one.
  2. Configure rules within a manageable scope. Start by testing the homepage, key product pages, article pages, and landing pages with parameters, then extend the rules to other pages. For bulk rules in particular, check that they don't mistakenly match the administration area, APIs, or other special paths.
  3. Check the actual response. Use browser developer tools or the command line to inspect the response from the old URL: the status code should be 301, the Location response header should point to the expected new URL, and the destination should ultimately return a normal page. A page appearing to redirect to a new URL in the browser does not prove that a 301 was used along the way.
  4. Check the number of redirects and look for issues. Ideally, the old URL should go directly to the final URL, without passing through multiple old domains or intermediate URLs. Also check for redirect loops, redirects to the wrong language, 404 errors on destination pages, and loss of important parameters.
  5. Update internal links and promotional entry points. Update internal links and URLs in the sitemap to use the new URLs, and check links still used in ads, social media profiles, email signatures, and elsewhere. For ad landing pages, check not only that they open, but also that tracking parameters, forms, and conversion tracking work correctly.

For example, use curl -I https://old.example.com/products/a to view the response headers for the old URL, then visit the destination shown in Location to confirm the final result. To track the entire redirect chain, use curl -IL. Browsers may cache permanent redirects, so after changing the rules, it's best to check again using the command line or a private browsing window.

Don't rush to shut down access to the old site after migration

A 301 rule works only as long as requests to the old URL can still reach the service that provides the redirect. After changing domains, continue maintaining the old domain, its DNS records, and the service providing the redirects. If the old URLs use HTTPS, also make sure the certificate for the old domain is valid; otherwise, visitors may encounter a security warning before receiving the redirect.

Setting up redirects doesn't mean you can stop checking on the day of the migration. After launch, keep monitoring search performance, crawl errors, and website access logs, and prioritize 404 pages that still receive visits, incorrect destination pages, and unusual traffic changes on important pages. For URLs with query parameters, distinguish between their purposes: advertising tracking parameters may need to be retained, while parameters that generate a large number of duplicate pages should be handled according to the website's actual rules.

If the migration involves multilingual website development, SEO, and advertising, maintenance also needs to be coordinated across these areas. When using website-building and international marketing services such as 易营宝, use the URL mapping document to clarify responsibilities with the relevant people for connecting the old domain, configuring redirects, and carrying out launch checks. The actual request results are what matter: the migration is complete only when old links reach the correct pages and forms and tracking work properly.

Inquire now

Related Articles

Related Products