How to setup a permanent domain redirect ? How to change your domain name ?

This post answers the following questions

How to redirect your website to a new ? or how to change a name ?

How to setup a 301 permanent redirect ?

How to setup .htaccess file?

Most website owners might end up facing these questions, when we start our website we would be happy with a name but at a later stage might find some other name more suitable for the website. So how to set up a new domain name without losing your existing subscribers, rank and old website name ? Well is actually very simple, setup a 301 Permanent redirect. It will redirect every of say site to

For example you currently have website named and you want to rename it to Then you need to setup the 301 redirect in the root directory of

In your domains control panel might point to folder named /myshop or even the root directory / (if you have only one website).

So everytime a request to access will be serviced from this folder's content.
For changing the domain point your new website name to point to folder /myshop and to point to a new folder /oldshop. Then in this oldshop folder create a file .htaccess (only extension no actual file name). In that file enter the following

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)$1 [R=301,L]

If user clicks a link of the .. say the 301 redirect will instead load Basically it replaces the x by y or old site name by the new name and preserving all the urls.

Typically search engines like will learn to go to new site and index its content automatically within a month. And meantime you will not lose any visitors/search .

(Visited 93 times, 1 visits today)

One Reply to “How to setup a permanent domain redirect ? How to change your domain name ?”

Leave a Reply

Your email address will not be published. Required fields are marked *