- 🇺🇸United States jimmb
I'm also having this problem, having built a Drupal1 10 site with Layout Builder and consequently having a node for the homepage (/homepage) that's also loading at the main domain URL.
As such, in the XML sitemap, I'm seeing the same page twice: domain.com and domain.com/homepage
My question is about this from comment #2 above:
you should ... go to admin/config/search/simplesitemap/custom and exlude the path /.
This would be a perfectly fine solution in the UI, but I'm not seeing how to do that. At /admin/config/search/simplesitemap/custom, I'm just seeing 'Add custom internal drupal paths to specific sitemaps.' and the 'Default' field below that (neither of which seem to apply here). And under that is 'Include images', which also isn't applicable.
So, where is this field where I can plug in "/homepage" as a relative path and have it excluded from the XML sitemap generation?
- Status changed to Active
6 months ago 6:53pm 26 June 2024 - 🇩🇪Germany gbyte Berlin
@jimmb If /homepage is a node, why not exclude that single node from index? (Edit the node and exclude it under the sitemap settings.)
And to answer your question (but in your case the above solution would be better I think): The default homepage is being indexed in the custom link area - removing the '/' from there means excluding the home page (or its duplicate) from index.
- 🇺🇸United States jimmb
Thanks so much for the reply! I'd considered doing what you suggested, but thought it would also remove the homepage on the main domain from being indexed....
But I just went into 'Edit' mode for /homepage, and selected "Do not index this Landing Page entity in sitemap". I then went to /admin/config/search/simplesitemap and clicked "Rebuild queue & generate".
And afterward, viewing my domain.com/sitemap.xml, I am seeing the main domain (i.e. the de facto homepage) as being indexed but not the redundant /homepage page. So this looks perfect now!
Thanks again for the help, and I will close this issue.
- Status changed to Closed: works as designed
6 months ago 9:25pm 27 June 2024 - 🇩🇪Germany gbyte Berlin
For 4.x see ✨ Respect front page configuration Closed: won't fix