Redirecting site or pages to a new domain or url aka 301 redirections

I learnt about 301 redirection when I moved my wordpress site from earlier domain to this new domain.

Htaccess redirect is better than the meta refresh or redirect tag because there is no delay as the browser reads the .htaccess file first. Here is how it works.

Go to your site’s root folder, download the .htaccess file to your local computer and edit it with a plain-text editor (ie. Notepad). If you are using FTP Client software and you don’t see any .htaccess file on your server, double check your setting and make sure you have turn on invisible / system files.

To Redirect Certain Page(s):

Redirect 301 /oldpage.html
Redirect 301 /oldpage2.html

To Redirect Entire Site:

Redirect 301 /

You can also do this by placing an index.php file in the place where you had your earlier site. But its not the right way to do it and will reduce the response time of your site.

Follow me
Latest posts by Abhishek Gupta (see all)

Leave a Reply