Portal Home > Knowledgebase > Web Hosting > HTML > How do I redirect my site?


How do I redirect my site?




To make a 301 redirect for a changed page, you need to add the following into a .htaccess file:

redirect 301 /old page name your.domain.com/new page name

So for example, if you wanted to redirect www.oldsite.com/smith.html to www.oldsite.com/jones.html, you would put

redirect 301 /smith.htmlhttp://www.oldsite.com/jones.html

To prevent google being confused about your site (Is it http://yourdomain.com or http://www.your.domain.com

Just add the following to a .htaccess file

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mywebsite.co.uk
RewriteRule (.*) http://www.mywebsite.co.uk/$1 [R=301,L]

This will cause anyone who uses mywebsite.co.uk to be automatically redirected to www.mywebsite.co.uk

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
What is the server path? (Views: 4976)

Powered by WHMCompleteSolution

Web Hosting - The World of Host
Language:

Contact Us

Sales
If you need to contact our sales team you can email them at: sales@theworldofhost.com
Marketing
If you need to contact our Marketing team you can email them at:  Markting@theworldofhost.com