Web Story News Sitemap
A lightweight WordPress plugin that generates a Google News-compatible XML sitemap specifically for Web Stories. It creates a clean URL endpoint, formats dates in IST timezone, includes featured images, and works seamlessly with Yoast SEO and LiteSpeed servers.
by Gunjan Jaswaal · github.com/gunjanjaswal/webstory-news-sitemap
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/gunjanjaswal/webstory-news-sitemap/archive/refs/heads/main.zipWeb Story News Sitemap for WordPress
A lightweight WordPress plugin that generates a Google News sitemap specifically for Web Stories. This plugin creates a dedicated XML sitemap that follows Google News guidelines for Web Stories, making them more discoverable in Google News and Google Discover.
Features
- Generates a Google News sitemap specifically for the
web-storypost type - Creates a clean URL endpoint at
/webstory-news-sitemap.xml - Includes proper Google News XML tags including:
<news:publication><news:publication_date><news:title><image:loc>for featured images
- Formats dates in IST timezone (Asia/Kolkata)
- Uses CDATA sections for titles and image URLs to handle special characters
- Includes
<lastmod>tags with the last modified date - Compatible with Yoast SEO and other SEO plugins
- Works with LiteSpeed servers
- Follows Google News guidelines (includes only posts from the last 2 days)
Installation
- Upload the
webstory-news-sitemapfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Your sitemap will be available at
https://your-site.com/webstory-news-sitemap.xml
Requirements
- WordPress 5.0 or higher
- Web Stories for WordPress plugin
- PHP 7.0 or higher
Compatibility
This plugin is designed to work alongside other SEO plugins like Yoast SEO. It uses advanced techniques to ensure its sitemap functionality doesn't conflict with other sitemap generators.
Troubleshooting
If you're having trouble accessing the sitemap at /webstory-news-sitemap.xml, try these steps:
- Go to Settings > Permalinks and click "Save Changes" to flush the rewrite rules
- If using Yoast SEO, try toggling the XML Sitemaps feature off and on again
- For LiteSpeed servers, you may need to add this to your .htaccess file:
# BEGIN Web Story News Sitemap <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^webstory-news-sitemap\.xml$ /index.php?webstory_news_sitemap=true [L] </IfModule> # END Web Story News Sitemap
Google Search Console Issues
If Google Search Console shows a 404 error for your sitemap even though the URL works in your browser, try these solutions:
-
Use the direct access URL parameter:
https://your-site.com/?webstory_news_direct=sitemapSubmit this URL to Google Search Console instead of the clean URL.
-
Check for user-agent restrictions: Make sure your security plugins aren't blocking the Googlebot user-agent.
-
Use the URL Inspection Tool: In Google Search Console, use the URL Inspection tool to see exactly how Googlebot views your sitemap.
-
Check server logs: Look for 404 entries when Googlebot tries to access the sitemap to identify any specific issues.
Google News Guidelines
This plugin follows Google News guidelines for sitemaps:
- Only includes posts from the last 2 days
- Limits the sitemap to 80 posts
- Uses proper Google News XML namespace and tags
- Includes publication name and language
License
This plugin is licensed under the GPL v2 or later.
Credits
Developed by Gunjan Jaswal (hello@gunjanjaswal.me)
Support
For support, please open an issue on the GitHub repository or contact the developer directly.
If this plugin helps your Web Stories get discovered, consider supporting development on Ko-fi: