Want to redirect your website to another place but can’t create .htaccess file?
Well this might be a solution to you, if your webhost supports server site php scripting.
The codes below will tell web-client (including search bot) that your website have been Moved Permanently to a new location and redirects them to a new location
The PHP version :
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: http://newdomain.com/');
The ASP version :
Response.Status="301 Moved Permanently"
Response.AddHeader "Location",\ "http://www.newdomain.com/"
What’s wrong with META Refesh tag? Well, firstly, it isn’t supported by all web-client (including bots). Secondly, the search engine will ignore the META Refresh tag and stops indexing your webpage.
By sending server response code 301 Moved Permanently, will inform that your website have been moved to another location and search bots will note that and index the new location instead. :)
p/s: This tip is useful in an event you can’t create a .htaccess file in your webhost.