Mobile app version of vmapp.org
Login or Join
Becky754

: 301 redirect the home pages but keep sitemap pages same I have manually redirected my entire site. The only page that's left is the homepage. How do I redirect my homepage to the new site

@Becky754

Posted in: #301Redirect #RegularExpression #Seo

I have manually redirected my entire site. The only page that's left is the homepage. How do I redirect my homepage to the new site (http://example.com) but keep my sitemaps on the old domain (www.example.com)? Below is the structure for the sitemap urls:

Main - www.example.com/sitemap.xml

Sub - www.example.com/sitemap-pt-post-2013-07.xml (Month and year are the only parts that change)

I have tried this and the site redirects but GWT tells me that I dont have a 301 set:

RewriteEngine on
RewriteCond %{HTTP_HOST} olddomain.com [NC]
RewriteCond %{REQUEST_URI} ^/$
Rewriterule ^(.*)$ newdomain.com/ [L,R=301]


P.S.

I want to do this so that I could track the 301 in GWT and etc. until things a finalized.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Becky754

2 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno851

I was able to get it to work using the following:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?olddomain.com$ [NC]
Rewriterule ^(.*) newdomain.com/ [L,R=301]
</IfModule>


Answer provided here:

301 redirect doersnt work in SERP

10% popularity Vote Up Vote Down


 

@Annie201

Unless you've left out essential information: just add a 301 redirect for the homepage only and your sitemaps and webmaster authentication will keep on functioning.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme