Mobile app version of vmapp.org
Login or Join
Barnes591

: How to have 2 sitemaps - 1 for main site the other for wordpress in subfolder Background My site runs on a dedicated server and and has Wordpress in a subfolder. I have my mainsite which

@Barnes591

Posted in: #RobotsTxt #Seo #Sitemap #Wordpress

Background

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: 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.

Question

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Barnes591

1 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

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: example.com/main-site-sitemap.xml Sitemap: example.com/wordpress/sitemap.xml

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme