Common Sitemap for WP Main Site and WP Blog (in Subdirectory)
How to create one sitemap for two WP sites: one WP is for the main site sitemap.xml and another for the blog with its own WP
Making one common sitemap for two WP sites with one WordPress in subfolder
We got a challenge to have a common sitemap for Google indexing for 2 WP sites so that new pages from both WP sites will appear automatically in the common sitemap for both sites. In our case, we have WP for the site https://www.normalbreathing.com and another WP for the site https://www.normalbreathing.com/blog/.
Solution: Create a file sitemap-all.xml with all sitemaps and upload it in the main directory. In our case, it should include https://www.normalbreathing.com/sitemap.xml for the main site and https://www.normalbreathing.com/blog/sitemap.xml
Submit the sitemap with both sitemaps within to Google:
https://www.normalbreathing.com/sitemap-all.xml
A sitemap can be submitted in the form of a TXT (text) file. In this case, it has only 2 lines:
https://www.normalbreathing.com/sitemap.xml
https://www.normalbreathing.com/blog/sitemap.xml
The name of this file with both sitemaps is https://www.normalbreathing.com/sitemap-all.txt
One can make manually one such sitemap file for all WP sites that are within the same domain name. For example, one can include there sitemaps for the forum, Amazon shop, etc.. In this case, the united sitemap (for Google) can look like this:
https://www.normalbreathing.com/sitemap.xml
https://www.normalbreathing.com/blog/sitemap.xml
https://www.normalbreathing.com/forum/sitemap.xml
https://www.normalbreathing.com/shop/sitemap.xml
When new pages are created, they will be automatically included in the main (or united) sitemap.
Recent Comments