Jump to content

Automatic Sitemap Submission - SEO focused automatic sitemap.xml search engine submission


Recommended Posts

Hey everyone-

We recently had a need come up for a website. After launching our website the company hired an SEO specialist who is doing some significant work revising and optimizing content. To help enhance this process I wrote a very simple module that automatically submits the website's sitemap.xml file to Bing and Google when a page is published, or when a page is saved that was already published.

As for our reasoning- there's a lot of information available as to why submitting your sitemap regularly can be beneficial. In classic Google style their official documentation says that there "is no guarantee" that submitting a sitemap alone will trigger a re-indexing by Google's bots. That said, devs have done tests where there is a strong correlation between a sitemap submission and activity by Google bots on that website. Google has stated that there is no limit or cap on the number of times you can submit a sitemap so there is no penalty for triggering this for every change. For more details and the hard science visit this excellent article https://trevorfox.com/2018/09/ping-sitemaps-search-engines/

2021 Update!

This module has been rebuilt almost entirely to perform even better and cover more events that can affect sitemap.xml data which makes it more effective for your SEO performance. Previously the module submitted the sitemap.xml URL when a page was saved but has now been expanded to encompass any event that potentially modifies your sitemap and does it more intelligently. These events include:

  • New page is published - New URL created
  • Existing page is unpublished - URL no longer available
  • Existing page is saved - Content on page may have changed
  • Existing page is moved - URL has changed
  • Existing page is deleted - URL no longer exists
  • Existing page is restored - URL is now available

ProcessSitemapSubmit also:

  • Checks if sitemap.xml exists/is available
  • Logs submissions and results to sitemap-submit log
  • Allows for the sitemap URL can be specified, defaults to yoursite.com/sitemap.xml
  • Templates can be excluded for pages created/saved that should not be submitted to search engines
  • Hidden pages do not trigger a submission.
  • Supports Bing and Google

As always, I'd never share a module with the community that I haven't used in production but I still ask that you test and ensure that it works for you. The repo for this module has a notice that it is still in development but I am going to bring it to a release and add it to the Modules directory soon (i.e. when I have a spare minute). This module should have little to no risk and the best way to test is to check the sitemap-submit logs for successful submissions.

I am a big fan of the Sitemap module by @Mike Rockett and use it on all of my sites. The Sitemap module uses caching to deliver your sitemap.xml file efficiently. I've worked with Mike to update his module so that it allows ProcessSitemapSubmit to clear it's cache and deliver the latest changes to search engines. This module is aware of Sitemap and works with zero configuration out of the box. To get this functionality in tandem with ProcessSitemapSubmit, please update the Sitemap module on your site. The Sitemap module is not a requirement for this module to work as long as your website has an available sitemap.xml to submit.

Check it out. https://github.com/SkyLundy/ProcessSitemapSubmit

Feedback and bug reports welcome!

Edited by FireWire
2021 re-release update
  • Like 3
  • Thanks 2
Link to comment
Share on other sites

Just to let you know that the idea is brillant and your module come in handy. I am sure we will have some feedback and pull-requests in the next weeks. To give some more visibility to the module, you could show us how/why to use it in conjunction with the others SEO modules existing here.

Thanks again mate ? ?

Link to comment
Share on other sites

9 hours ago, flydev said:

Just to let you know that the idea is brillant and your module come in handy. I am sure we will have some feedback and pull-requests in the next weeks. To give some more visibility to the module, you could show us how/why to use it in conjunction with the others SEO modules existing here.

Thanks again mate ? ?

That's a great idea. I'm going to add some information to the configuration screen with recommendations and information on that as well.

Would this benefit from creating a post in the Modules/Plugins forum since this one is in the Module/Plugin Development forum? I initially wanted to see if there's any critiques or feedback that showed it wasn't ready for primetime but I think it is.

Link to comment
Share on other sites

  • FireWire changed the title to Automatic Sitemap Submission - SEO focused automatic sitemap.xml search engine submission

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...