Title: sitemap
Last modified: August 22, 2016

---

# sitemap

 *  Resolved [mrppp](https://wordpress.org/support/users/mrppp/)
 * (@mrppp)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/)
 * if i want to redirect my oldsitemap so from [http://www.mysite.co.uk/sitemap.xml](http://www.mysite.co.uk/sitemap.xml)
   to [http://www.mysite.co.uk/sitemap_index.xml](http://www.mysite.co.uk/sitemap_index.xml)
   
   would i just add this to the **CUSTOM CODE BOTTOM HOTLINKING/FORBID COMMENT SPAMMERS/
   BLOCK BOTS/BLOCK IP/REDIRECT CODE:**
 * `RewriteRule ^sitemap\.xml http://www.mysite.co.uk/sitemap_index.xml [L,R=301]`
 * [https://wordpress.org/plugins/bulletproof-security/](https://wordpress.org/plugins/bulletproof-security/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478774)
 * 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](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478777)
 * 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](http://forum.ait-pro.com/forums/topic/wordpress-robots-txt-wordpress-virtual-robots-txt/#post-6523)
 *  Thread Starter [mrppp](https://wordpress.org/support/users/mrppp/)
 * (@mrppp)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478786)
 * 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](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478790)
 * 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](https://wordpress.org/support/users/mrppp/)
 * (@mrppp)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478793)
 * Understood, even on seo forums best practice is mixed lol
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478794)
 * 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](https://wordpress.org/support/users/mrppp/)
 * (@mrppp)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478795)
 * 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.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘sitemap’ is closed to new replies.

 * ![](https://ps.w.org/bulletproof-security/assets/icon-128x128.png?rev=1731938)
 * [BulletProof Security](https://wordpress.org/plugins/bulletproof-security/)
 * [Support Threads](https://wordpress.org/support/plugin/bulletproof-security/)
 * [Active Topics](https://wordpress.org/support/plugin/bulletproof-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bulletproof-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bulletproof-security/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [mrppp](https://wordpress.org/support/users/mrppp/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/sitemap-33/#post-5478795)
 * Status: resolved