How to Set Up Domain Redirection Without Losing SEO Rankings

Illustration of pages being redirected from an old website to a new one
Photo by Julio Lopez on Pexels

To set up domain redirection without losing search rankings, send each page on your old domain to its matching page on the new domain using a 301 redirect. A 301 tells search engines that the page has moved permanently. Google’s guidance is that permanent redirects do not cause a loss in PageRank (Google’s measure of link value), so a well-planned move can keep most of your rankings. The steps below show how to map your pages, set up the redirects, tell Google about the change and check that everything works.

What a 301 redirect is and why it matters

A redirect is an instruction that sends a visitor, and a search engine, from one web address to another. When someone opens the old address, the server replies with a code and the new address. A 301 is the code for a permanent move.

A 302 redirect signals a temporary move. Use a 301 when the old address is gone for good. Google recommends permanent server-side redirects where possible, such as 301 or 308.

Without redirects, visitors land on an error page, and search engines drop the old pages from their results. Any links pointing to the old domain stop counting for your new site.

Some claims about link value are not reliable

You may read that a redirect loses a large share of ranking value, sometimes quoted as up to 30%. That figure comes from a third party, not from Google’s documentation. Google’s position is that permanent redirects do not lose PageRank. You still need to do the move carefully, because mistakes such as broken pages or long redirect chains can cause real problems.

When you need a domain redirect

You usually need a domain redirect in these situations:

  • Rebranding. You change your business or site name and the domain changes with it.
  • Merging sites. Two websites become one, and one domain takes over.
  • Retiring an old domain. You move to a new domain and want people who use the old one to reach your content.
  • Changing the main domain ending. For example, moving from one ending to another, such as example.com to example.net.

You do not need a 301 for every small change. Switching between www and non-www on the same domain, moving from HTTP to HTTPS, or moving pages within the same domain is handled differently. Google’s Change of Address tool, covered below, is only for moves between domains or subdomains.

Before you start: plan the move

Keep the new domain live with your content

Set up the new domain first. Copy your content across, keep the same page structure where you can, and make sure the new site loads properly. Redirects should point at pages that already work.

Verify both domains in Search Console

Google Search Console is a free tool that shows how Google sees your site. Add and verify both the old domain and the new domain. You need access to both to submit a change of address later.

Write down your important pages

Export a list of your URLs. Your sitemap (a file that lists your pages for search engines), your analytics tool and Search Console’s Pages report can all help. Focus first on pages that get traffic, earn links or sell products.

Step 1: Build a URL map

A URL map is a simple list. Each old address is paired with the matching new address. It is the most important part of the job.

Old URL New URL Notes
https://old-example.com/ https://example.com/ Homepage to homepage
https://old-example.com/services/ https://example.com/services/ Section page to matching section
https://old-example.com/blog/spring-tips/ https://example.com/blog/spring-tips/ Post to the same post
https://old-example.com/old-price-list/ (none) Page you are dropping, see below

Follow these rules when you build the map:

  • Match each page to its equivalent. A product page should go to the same product on the new site.
  • Do not send everything to the homepage. Redirecting many old pages to one unrelated page confuses visitors and search engines. Google treats this as a poor match.
  • Pages you are dropping do not need a new destination. If you are not keeping a page, you do not have to redirect it to something unrelated. Let it return a “not found” response, or point it to the closest relevant page if one exists.
  • Avoid chains. A chain is when one old address redirects to a second address, which redirects to a third. Google can follow a chain of up to 10 steps, but it advises redirecting straight to the final address.

Step 2: Set up the 301 redirects

How you set up redirects depends on your type of site. Choose the section that fits you.

Option A: WordPress with the Redirection plugin

The Redirection plugin is free and listed on WordPress.org. Its listing describes it as the most popular redirect manager for WordPress. The basic steps are:

  1. Log in to your WordPress dashboard.
  2. Go to Plugins > Add New.
  3. Search for Redirection, check that the author is John Godley, then click Install and Activate.
  4. Open the Redirection screen in the dashboard and add each redirect. Enter the old address as the source URL and the new address as the target URL. Choose the 301 redirect type.

The plugin can also watch for changes to post and page addresses and create redirects automatically. This helps if you change your permalink structure (the pattern used in your page addresses).

Note that the redirects are stored in the plugin’s database table. Before you change plugins or remove this one, export your redirect list. Otherwise you may lose the list. Keep the redirects in place for as long as the advice in the timing section below.

Plugin versions and compatibility details change over time. Check the live WordPress.org page for the current version and requirements before you install.

Option B: Apache server with an .htaccess file

Many Apache servers read redirect rules from a file called .htaccess. It is usually in the root folder of your old domain, often named public_html. A simple domain-wide redirect looks like this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^old-example\.com$ [NC]
RewriteRule ^(.*)$ https://example.net/$1 [R=301,L]

This example sends every page to the same path on the new domain. That only works when your new site has the same page paths. If your structure has changed, you need one rule per page, as in your URL map.

Warning: back up the .htaccess file before you edit it. A single typing error can take the whole site offline. If you are unsure, ask your host or developer to add the rules.

Option C: Other servers, such as Nginx

Nginx and some other servers use their own configuration files rather than .htaccess. The setup varies by server. Ask your hosting provider or developer to add the redirects for you, and give them your URL map.

Step 3: Test the redirects

Test a sample of pages first, then the full list.

  1. Open an old address in a browser. Check that it lands on the correct new page, not the homepage.
  2. Check that the new address loads without errors.
  3. Use Google’s URL Inspection Tool in Search Console to check how Google sees the new pages.
  4. For a large site, use a crawling tool that follows redirects and reports the status codes. Look for any 302 responses, any chains, and any 404 “not found” errors where you expected a redirect.

Test your most important pages first. Then test a sample from each section of the site.

Step 4: Tell Google about the move

If you are moving to a new domain or subdomain, use the Change of Address tool in Search Console. Google’s help page describes it. The steps are:

  1. Open the old site in Search Console.
  2. Go to Settings, then Change of address. Check this path against Google’s current help page, as menus change.
  3. Select the new site. Google checks that you own both sites and that the old pages redirect with a 301.
  4. Submit the request.

Google asks you to submit the change for all verified versions of the old domain. This includes subdomains and the www and non-www versions, even if you do not use them. Google says the move may take up to 180 days to complete.

After the request, submit a new sitemap for the new domain. This helps Google find the new pages quickly.

Step 5: Update links you control

Redirects do the main work, but cleaning up your own links helps too:

  • Update internal links inside your site so they point to the new addresses. This avoids sending visitors through a redirect each time.
  • Update your email signature, business listings, social media profiles and printed material.
  • Ask important partners, directories and other websites to update their links where this is practical.

How long to keep redirects

Google has given two timings. Its site-move guide advises keeping redirects for at least one year. Its Change of Address help page says at least 180 days, and longer if you still see visits from Google Search to the old addresses.

The one-year figure is the safer default. Keep the redirects for at least a year, and longer if the old addresses still get traffic. Do not remove them to tidy up your server.

Common SEO mistakes to avoid

Mistake What to do instead
Sending all old pages to the homepage Map each page to its closest equivalent
Using 302 (temporary) redirects for a permanent move Use 301 redirects
Creating redirect chains Point each old address straight to its final page
Removing the old domain’s hosting or redirects too early Keep redirects for at least a year
Redirecting only the homepage Redirect every page that has traffic or links
Leaving broken internal links Update links inside your site to the new addresses
Changing content and design during the move Keep content the same during the switch, improve it afterwards
Forgetting to verify the new domain in Search Console Verify both domains before you start

Monitor the move

After the move, check Search Console for a few weeks. Watch these reports:

  • Pages, to spot pages that are not indexed or show errors.
  • Crawl errors and “not found” reports, to find old addresses that have no redirect.
  • Search performance, to compare clicks and impressions before and after the move. Some dip is normal in the first weeks.

If a page shows a “not found” error, check your URL map. Add a redirect if the page has a clear equivalent.

Next steps

  1. Decide whether your move needs a 301 redirect, or whether another fix is enough.
  2. Export your current page list and build a URL map.
  3. Set up the new domain and verify both domains in Search Console.
  4. Add the redirects, test them, then submit the change of address.
  5. Keep the redirects for at least a year and check Search Console regularly.

If you want to understand the basics first, read about what to do after buying a domain name. For a broader view of how pages get found, see how to make your website SEO-friendly.

FAQ

Will a 301 redirect cause me to lose all my Google rankings?

Not if you set it up correctly. Google says permanent redirects do not lose PageRank. Rankings can dip for a short time while Google processes the move, so keep the redirects in place and monitor Search Console.

Do I need to redirect pages I no longer want?

No. If a page is gone and has no equivalent on the new site, you do not need to send it somewhere unrelated. Redirecting it to the homepage is usually the wrong choice.

How long should I keep my old domain redirecting?

Google advises keeping redirects for at least one year. Its Change of Address help page says at least 180 days, and longer if you still get visits from Google Search. One year is the safer choice.

Can I set up a domain redirect without touching code?

On WordPress, a plugin such as Redirection lets you add redirects from the dashboard. On other setups, you may need to ask your hosting provider or developer to add the rules, especially if the server does not use a simple .htaccess file.