Search code examples
dnshttp-status-code-301transfer

Best way to change domain names


I have a blog which i get about 1200 visits a month lets say the blog domain name is.

exampleblog.com

What i want to do is complete change the domain name to say.

iamsam.com

What is the correct way to do this should i map the domain iamsam.com to my exampleblog.com account on my hosting then put a 301 redirect in the htaccess to redirect traffic to the correct domain ie.

Options +FollowSymlinks
rewritecond %{http_host} ^exampleblog.com [nc]
rewriterule ^(.*)$ http://www.iamsam.com/$1 [r=301,nc]

Is this the correct way to do this???

Can someone advise me thanks


Solution

  • Yes, that is exactly the way to do it, assuming the URL scheme for the new domain is exactly the same as the old domain.

    You might also want to capture users that use the old address and display some sort of notification on the new website, so that they'll notice the change and update their bookmarks.