Plugin Author
AITpro
(@aitpro)
Personally I don’t think you should use any other naming convention except for “sitemap.xml” or create a sitemap file that is not named sitemap.xml. I am not sure if other names are allowed or will cause problems so you should research that very carefully before doing that. I have only used sitemap.xml. I have only used robots.txt and I believe that is the only valid name for a robots.txt file.
Plugin Author
AITpro
(@aitpro)
You can have several sitemap files and add entries in your robots.txt file to the location of those sitemap files. I believe with WordPress you want to use this virtual robots function in your theme’s functions.php file instead of using a robots.txt file.
http://forum.ait-pro.com/forums/topic/wordpress-robots-txt-wordpress-virtual-robots-txt/#post-6523
Thread Starter
mrppp
(@mrppp)
With WP seo it alto generates one sitemap_index.xml
that is ok as Google recommend one like that, i just wondered about redirecting old one as i am moving 301 redirecting urls.
Plugin Author
AITpro
(@aitpro)
Ok if you think it is ok then fine. I wouldn’t use any other naming convention except for sitemap.xml, but that is just me.
Ok now for the main reason I would not redirect a sitemap file. I have no idea if Google or other search engines allow you to do a redirect on a sitemap file. The search engines may think you are doing something shady or they may just not crawl it because they do not allow redirects for sitemap files. You should check that out next.
A sitemap is very important obviously so you do not want to screw this up. 😉
Since these things are things I would never consider doing on my sites then I want to be very cautious here. I do not want to “OK” something I would never do so at most you will get a confirmation from me that your code is valid, but I cannot approve any of these things personally. 😉
Thread Starter
mrppp
(@mrppp)
Understood, even on seo forums best practice is mixed lol
Plugin Author
AITpro
(@aitpro)
Yep everyone has different ideas about what the best SEO methods are. I just do the old school method. Create relevant titles for my posts and create valuable content. Everything seems to work out just fine doing that.
I am going to confirm that your redirect code is good, but I am not going to “OK” doing any of these things you are doing. I am going to suggest an improvement to your code, but I am not going to “OK” its use since I would never do this on my sites.
Note: If a problem occurs then I did not “OK” any of this and am just confirming that the code itself if valid and not the methods being used.
RedirectMatch 301 ^/sitemap.xml$ http://www.mysite.co.uk/sitemap_index.xml
Thread Starter
mrppp
(@mrppp)
Understood. To be honest before i just deleted old sitemap and added new but now i,m not sure too many people with too many best ways lol.