Skip to Main Content
How to Redirect Domain but Preserve Everything After

Let’s say you’ve totally redesigned your website, but left all the URLs the same.  Other than the new design, the ONLY thing that’s changed is your root domain name.  You still have lots of traffic going to the old domain as well as years of SEO juice.  All you want to do is forward them to that same great content, just on the new domain.

How do you redirect all those old links to the new domain, but preserve everything after the domain name in the URL?  Here’s how.

For the sake of clarity, we’ll use olddomain.com and newdomain.com.  Obviously, those are the values you’ll want to change.

Rewrite via .htaccess

Open your .htaccess file from the old domain in your favorite editor, or even just use Notepad.  At the top, paste the following.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^olddomain\.com
RewriteRule (.*) http://newdomain.com/$1 [R=301,L]

What does it do?  Well, let’s say someone arrives at olddomain.com/about/whatever/.  This handy little Rewrite directive will then 301 redirect them to newdomain.com/about/whatever/.

Why 301 Matters

There are some articles out there that don’t use the 301 redirect directive.  That’s not what you want.

If you’re not redirecting using 301, search engines like Google or Bing will see two websites with the same content that can cause ranking drops in one or both sites.

So, from an SEO perspective, you gotta use 301 redirects.

Tell Google

Once tall that jazz is done, don’t forget to tell Google.  Correct implementation of this 301 redirect should be good enough all by itself, but Google offers several features within their Search Console to make the update process as smooth as possible.

Start by performing a Change of Address within the Google Search Console for your old domain.  It’s kind of hidden in the top-right corner under the “cog” icon.

Search Console Change of Address

You should already have your new domain verified in Google Search Console too, select this in the drop down below, and press submit.

If you’d like to learn more about “Change of Address” and why it’s worth using, Google’s Matt Cutts explains it in a video here.  For extra credit, check out our support article all about the Search Console as a whole.

Share the love:

Get Support

Nobody's perfect. If you need a little help, request support from the super-nerds at JDM Digital.

Any information you provide here will be kept confidential and only used for this purpose.

So we can follow-up.

The URL of the issue.

The more specific you can be, the better.

I am 100% robot

You're not a robot, are you? Sorry we have to ask.