My site runs on a dedicated server and and has Wordpress in a subfolder.

I have my mainsite which is not wordpress and that has a sitemap - for example example.com/sitemap.xml ... that sitemap is updated by a php program and is auto submitted to google and bing. This sitemap only contains pages that are in the root of my domain and has approx 1000 entries.

I have a robots.txt in the domain root containing for example Sitemap: http://www.example.com/sitemap.xml

I now also have Wordpress installed in a subfolder - for example example.com/news/

I also have the free Yoast SEO plugin installed but currently have xml sitemap functionality disabled.


I have several related questions.

1) What is the best way for me to have multiple sitemaps - the mainsite one and one or more for the wordpress part of the site? My wordpress articles are mainly news articles but I am not accepted into Google News yet.

2) Should I just enable Yoast sitemaps or should I use a different sitemap plugin such as Google XML Sitemaps or even some other sitemap plugin (I looked at Better WordPress Google XML Sitemaps but that currently says Compatible up to: 4.4.7 Last Updated: 1 year ago) - I am on Wordpress 4.7.2

3) Do I replace the line in my current robot.txt with a sitemapindex

4) Should the sitemaps have different names - for example sitemap1.xml and sitemap2.xml

Any other considerations would be appreciated.

1 Answer 1


It is fine to have multiple XML sitemaps for different parts of your site. Tools such as Yoast are able to generate the sitemap for the WordPress part of your site, and you may find a different sitemap generator for the other part.

The Google XML sitemap generator crawls your site to generate the sitemap. The Yoast one will pull the posts out of the database.

If you have multiple sitemaps, they should have different names or reside in different directories. As long as each sitemap has a unique URL on your site, it is fine.

You can list your sitemaps in robots.txt, or submit them each to Google Search Console. Here is some sample code for robots.txt:

 Sitemap: http://example.com/main-site-sitemap.xml
 Sitemap: http://example.com/wordpress/sitemap.xml

Not the answer you're looking for? Browse other questions tagged or ask your own question.