I am currently not available for projects

Hi, I'mKevin Shoffner

Redirect Old Domain to New Domain keeping URL

Something I see lots of times with clients is they are re-branding themselves or simply found a new domain they like better. Normally that’s an easy 301 Redirect in the registrar, cPanel, or .htaccess file. BUT – what if the site is very popular and has lots of links (Pinterest, etc) to direct posts. You doing want to send all site traffic to the homepage. But the good news is, you can fix this.

So how do you the redirect?

Redirect Old Domain to New Domain keeping URL

Open .htaccess
Add the following code

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !new-domain.com$ [NC]
RewriteRule ^(.*)$ http://new-domain.com/$1 [L,R=301] What does this mean? It means you are telling the server to send all traffic from the current site to the new domain with a wild card redirect. So if that's HTTP or if HTTPS, it will go to the same URL but the domain is the new domain. Easy enough and enjoy. Let me know if you have other ideas on how you do it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: