
If you added the How to Add Mark’s Sitemap to Your Site mod to a v2 store, then updated the store to v3, then you will need to add the mod detailed in this post. Mark’s sitemap will no longer work correctly in v3. If you check the sitemap created with the above mod you will see an error similar to this:

Even if you could get this sitemap to work it is better to use the sitemap generated by v3 of Build A Niche Store (BANS). Why? Because Mark’s sitemap does not include content pages but the one created by v3 does.
It is very possible that search engines have already indexed your previous sitemap. This is why you will want to follow these instructions. You need to tell anyone who attempts to go to your old sitemap that there is a new one. These instructions will tell that to search engines and people who click on links to your old sitemap will automatically land on your new one. Pretty cool, eh?
These instructions come from Mark. You can see his instructions for this at his Niche Store Builder blog.
My instructions to redirect your old sitemap to your new sitemap: | |
Step One | |
| Log in to your site’s Admin and click on the ‘Template‘ tab and ‘header.php‘ or ‘footer.php‘ link for the template you are using. Which file you open depends on where you placed the contents of header-changes-02.txt in step six of How to Add Mark’s Sitemap to Your Site. | |
| Save a copy of the original code (click here for instructions on how to do this). | |
| Search for the following code: | |
<?php if (curPageURL() == “http://www.MYURL.com/MY-SITEMAP-URL”) | |
| Note: "http://www.MYURL.com/MY-SITEMAP-URL”) will actually be the link to your site’s sitemap, as created in Mark’s public sitemap mod. | |
| Step Two | |
| Copy contents of 301redirect.txt and paste it on the code you found in step one. In other words, you will delete the code from step one and replace it with the contents of 301redirect.txt. | |
| Note: Change the following: | |
| |
| Save changes. Do NOT view your site for errors yet as there will be errors until you complete all these steps. | |
Step Three | |
| Copy the code you just pasted and modified with the correct URLs. | |
| Step Four | |
| Go to the header.php if you aren’t already there. | |
| Paste the code you copied in step three ABOVE all other code. | |
| Save changes. Now you may view your site for errors. | |
| Note: If you see an error at this point then go back and check the code you pasted at the top of header.php. Make sure there every line is aligned against the left margin. The following example will cause an error because the code on the first line of this code is not flush against the left margin: | |
<?php if (curPageURL() == "http://YourURL.com/Your-Old-Sitemap") | |
| If you DO see any spaces as in the example above then remove them so the code is flush against the left margin: | |
<?php if (curPageURL() == "http://YourURL.com/Your-Old-Sitemap") | |
. | |
Rochelle
[...] Note: If you added this mod to your v2 store and then updated the store to v3 then you need to read How to Redirect Your Old Sitemap to Your New Sitemap. [...]