How Do I Tell Google That I Have Moved My Domain Name Only?
Jul 2nd, 2007 by Charles
Solution:
Simply do a 301 Redirect from your old domain name to your new domain name. It doesn’t matter you are just changing between the sub-domain names, or between the new domain names. So long as it is telling Google that you have permanently moved to a new domain name, that’s the important point.
Try not to use Meta Refresh as possible. I heard that Google don’t like to use that due to a technique used for spamming Search Engines.
How to do it for Unix/Linux:
Look for .htaccess in your directory where your webpages are resided. If it is not found, create a new file called “.htaccess” then. Put in the following line inside:
redirect 301 /directory/file.html http://www.domainame.com/directory/file.html
And you are done. Do a test with your old domain name, and see if it redirects to your new domain name. Keep the old redirect for probably at least 1 month to let search engines and your visitors know of your domain moving.
How to do it for Windows:
Place the following code above your <html> tag or <!DOCTYPE>, if you have one:
<%@ Language=VBScript %>
<%
response.status="301 moved permanently"
Response.AddHeader "Location", "http://www.domain.com/file-location.html"
%>
If you are using .asp.net pages, the code should look like:
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
response.status = "301 moved permanently";
Response.AddHeader("Location","http://www.domain.com/file-location.html");
}
</script>
The URL after “Location” should be the exact location to which you want the page to redirect.
No comments yet.