I have reconfigured all of my url structures on my development server, but don't want to lose the existing urls indexed in Google, etc..
How would I go about redirecting my existing URL's to the new URL's on my new server when I switch over to it?
Welcome to SEOChat, a community dedicated to helping beginners and professionals alike in improving their Search Engine Optimization knowledge. Sign up today to gain access to the combined insight of tens of thousands of members.
I have reconfigured all of my url structures on my development server, but don't want to lose the existing urls indexed in Google, etc..
How would I go about redirecting my existing URL's to the new URL's on my new server when I switch over to it?
301 redirect. Check out this page by google
301 redirects - Webmaster Tools Help
SEO success depends on your users impression of your website, so think user!
Sefati Search Consulting |Search Marketing Post | Guest Blog Community
For 301 Redirect you need to make changes in .htaccess file which will be hosted on your server. I want to show you code for it:
PHP Redirect:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-domain.com" );
?>
In ASP:
Open the old web page and replace all its content with the following code, replacing "www.new-location.com" with the file name of the new page.
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.new-location.com"
%>
In ASP .NET:
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-location.com");
}
</script>
Where you able to make this change successful? I tried it on my website and got a blank white page.
I just did that with a site with a url I am no longer using. It is re-directed to my new site.
Question: What will happen when G picks it up and I get an extra few thousand links all of the sudden on my new site. Could this hit a red flag?
Its usually preferable to do the 301 redirect with an .htaccess file. This way you can be a little more flexible in the conditions of the URLs. You can also provide redirects and rewrties for URLs that don't exist any more (which is probably the case when you upload a different site). The method discussed by cristinascabbia requires that you place this on every single page. .htaccess can handle site wide with one conditional line - or on a line by line basis if required.
URL redirection is an extremely useful service aimed at helping users point their domains or subdomains to certain URLs when necessary. This is usually needed in cases when a certain website is no longer available under its original domain name when all users linking to it need to be automatically informed of this update. Thus, the URL redirection functionality helps domain owners preserve the relevance of the incoming links to their websites.
Become Part of This Conversation
Join NowFor Free!
Comments on this post