XML Sitemap & Google News Feeds
Feeds that comply with the XML Sitemap and Google News protocol for the hungry spiders. Multisite compatible.
This plugin dynamically creates feeds that comply with the XML Sitemap and the Google News Sitemap protocol. Multisite and Polylang compatible and there are no files created. Options can be found on Settings > Reading to control which sitemaps, which post and taxonomy types are included, how priority is calculated, who to ping and set additional robots.txt rules.
You or site owners on your Multisite network will not be bothered with complicated settings like most other XML Sitemap plugins. The default settings will suffice in most cases and XML sitemap values like ChangeFreq and URL Priority are auto-calculated based on post age and comment activity.
The XML Sitemap Index becomes instantly available on yourblog.url/sitemap.xml (or yourblog.url/?feed=sitemap) containing references to posts and pages by default, ready for indexing by search engines like Google, Yahoo, MSN, Ask.com and others. When the Google News Sitemap is activated, it will become available on yourblog.url/sitemap-news.xml (or yourblog.url/?feed=sitemap-news), ready for indexing by Google News. Both are automatically referenced in the dynamically created robots.txt on yourblog.url/robots.txt to tell search engines where to find your XML Sitemaps. And both are sent by ping to Google and Bing on each new publication.
Please read the FAQ's for info on how to get your articles listed on Google News.
Compatible with caching plugins like WP Super Cache, W3 Total Cache and Quick Cache that cache feeds, allowing a faster serving to the impatient (aren't we all when hungry?) spider.
If you do not use fancy URL's or you have WordPress installed in a subdirectory, a dynamic robots.txt will NOT be generated. You'll have to create your own and upload it to your site root! See FAQ's.
On large sites, it is advised to use a good caching plugin like Quick Cache, WP Super Cache or W3 Total Cache to improve your site and sitemap performance.
- The main advantage of this plugin over other XML Sitemap plugins is simplicity. No need to change file or folder permissions, move files or spend time tweaking difficult plugin options.
- Completely automatic post URL priority and change frequency calculation based on post age and comment and trackback activity.
- Works out-of-the-box, even on multi-site / shared codebase / multi-blog setups like WordPress MU, WP 3.0 in MultiSite (WPMS) mode and others.
- Also works upon Network Activate or placed in /mu-plugins/ on WP 3.0 in MS mode and WPMU and even takes care to exclude any tags blogs to avoid malus points for link spamming.
- Compatible with multi-lingual sites using Polylang to allow all languages to be indexed equally.
- Pings Google and Bing on new post publication.
- Options to define which post types and taxonomies get included in the sitemap and automatic priority calculation rules.
- Set priority per post.
- Option to add new robots.txt rules. These can be used to further control (read: limit) the indexation of various parts of your site and subsequent spread of pagerank accross your sites pages.
- Dutch * Author: R.A. van Hagen (version 4.1)
- French * Author: R.A. van Hagen (version 4.1)
- Serbian * Author: WPdiscounts (version 4.1)
- Ukrainian * Author: Cmd Software (version 4.0)
New transtations will be accepted and listed here. See translation instructions under Other Notes.
XML Sitemap Feed was originally based on the discontinued plugin Standard XML Sitemap Generator by Patrick Chia. Since then, it has been completely rewritten and extended in many ways.
|Tags||bing, feed, google, google news, news sitemap, polylang, robots.txt, seo, sitemap, sitemap.xml, xml sitemap, yahoo|
Quick installation: Install now !
… OR …
Search for "xml sitemap feed" and install with that slick Plugins > Add New back-end page.
… OR …
Follow these steps:
Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favourite FTP client to the /plugins/ folder.
Activate the plugin on the Plugins page.
If you have been using another XML Sitemap plugin before, check your site root and remove any created sitemap.xml file that remained there.
Done! Check your sparkling new XML Sitemap by visiting yourblogurl.tld/sitemap.xml (adapted to your domain name ofcourse) with a browser or any online XML Sitemap validator. You might also want to check if the sitemap is listed in your yourblogurl.tld/robots.txt file.
WordPress 3+ in Multi Site mode
Same as above but do a Network Activate to make a XML sitemap available for each site on your network.
The plugin works best from the /mu-plugins/ folder where it runs quietly in the background without bothering any blog owner with new options or the need for special knowledge of XML Sitemap submission. Just upload the complete package content to /mu-plugins/ and move the file xml-sitemap.php from the new /mu-plugins/xml-sitemap-feed/ to /mu-plugins/.
Installed alongside WordPress MU Sitewide Tags Pages, XML Sitemap Feed will not create a sitemap.xml nor change robots.txt for any tag blogs. This is done deliberately because they would be full of links outside the tags blogs own domain and subsequently ignored (or worse: penalised) by Google.
- BUGFIX: Pass by reference fatal error in PHP 5.4
- BUGFIX: issue with Polylang language code in pretty permalinks setting
- BUGFIX: unselected post types in sitemap
- BUGFIX: 1+ Priority for sticky posts with comments
- Dutch and French translations updated
- NEW: Ping Google and Bing on new publications
- NEW: Set priority per post
- NEW: Priority calculation options
- NEW: Option to split posts by year or month for faster generation of each sitemap
- Reduced queries to increase performance
- Improved Lastmod and Changefreq calculations
- Core class improvements
- Dropped qTranslate support
- Dropped PHP4 support
- BUGFIX: removed several PHP notices
- NEW: Dutch and French translations
- BUGFIX: Non public sites still have sitemap by default
- BUGFIX: Invalid argument supplied for foreach() when all post types are off
- BUGFIX: Wrong translation dir
- Moved to sitemap index and seperated post/page sitemaps
- NEW: options to dswitch off sitemap and news sitemap
- NEW: select which post types to include
- NEW: select which taxonomies to include
- NEW: set additional robots.txt rules
- NEW: Translation POT catalogue
- Improved Polylang support
- Dropped xLanguage support
- qTranslate currently untested
- Basic Google News feed stylesheet
- improvement on XSS vulnerability fix
- Fixed trailing slash
- SECURITY: XSS vulnerability in sitemap.xsl.php
- Google News Sitemap
- Memory limit error workaround (for most sites)
- BUGFIX: PHP4 compatibility
- BUGFIX: stylesheet URL when installed in mu-plugins
- core change to class
- minified sitemap output by default
- xLanguage support based on code and testing by Daniele Pelagatti
- new FILTER HOOK
robotstxt_sitemap_urlfor any translate and url changing plugins.
- BUGFIX: Decimal separator cannot be a comma!
- filter out external URLs inserted by plugins like Page Links To (thanks, Francois)
- minify sitemap and stylesheet output
- BUGFIX: qTranslate non-default language home URL
- qTranslate support
- no more Sitemap reference in robots.txt on non-public blogs
- switch from
add_feed(on init) to the
is_404()condition TRUE and Response Header 404 on sites without posts
is_feed()condition FALSE after custom query_posts
- BUGFIX: no lastmod on home url when only pages on a site
- BUGFIX: stylesheet url wrong when WP installed in a subdir
- massive changefreq calculation improvement
- further priority calulation improvement taking last comment date into account
- BUGFIX: wrong date calculation on blogs less than 1 year old
- massive priority calculation improvement
- complete rewrite of plugin internals
- speed improvements
- WP 3.0 (normal and MS mode) ready
- BUGFIX: use home instead of siteurl for blog url for sitemap reference in robots.txt
- code streamline and cleanup
- automatic exclusion of tags blog in wpmu
- rewrite and add_feed calls improvements
- BUGFIX: double entry when static page is frontpage
- added styling to the xml feed to make it human readable
- BUGFIX: lastmod timezone offset displayed wrong (extra space and missing double-colon)
- priority calculation based on comments and age
- changefreq based on comments
- changed feed template location to avoid the need to relocate files outside the plugins folder
- rework from Patrick Chia's Standard XML Sitemaps
- increased post urls limit from 100 to 1000 (of max. 50,000 allowed by the Sitemap protocol)
Where are the options?
See the XML Sitemaps section on Settings > Reading.
How do I get my latest articles listed on Google News?
Go to Suggest News Content for Google News and submit your website info as detailed as possible there. Give them the URL(s) of your fresh new Google News Sitemap in the text field 'Other' at the bottom.
You will also want to add the sitemap to your Google Webmasters Tools account to check its validity and performance. Create an account if you don't have one yet.
My Google News Sitemap is empty!
The rules of the Google News Game are that you do not feed the monster any stale food. Older than 2 days is bad. You need to bake him some fresh bread ;)
Can I manipulate values for priority and changefreq?
Yes. You can find default settings for priority, changefreq and lastmod on Settings > Reading. A fixed priority can be set on a post by post basis too.
Do I need to submit the sitemap to search engines?
No. In normal circumstances, your site will be indexed by the major search engines before you know it. The search engines will be looking for a robots.txt file and (with this plugin activated) find a pointer in it to the XML Sitemap on your blog. The search engines will return on a regular basis to see if your site has updates.
Besides that, Google and Bing are pinged upon each new publication.
NOTE: If you have a server without rewrite rules, use your blog without fancy URLs (meaning, you have WordPress Permalinks set to the old default value) or have it installed in a subdirectory, then read Do I need to change my robots.txt for more instructions.
Does this plugin ping search engines?
Yes, Google and Bing are pinged upon each new publication. Unless you disable this feature on Settings > Reading.
Do I need to change my robots.txt?
That depends. In normal circumstances, if you have no physical robots.txt file in your site root, the new sitemap url will be automatically added to the dynamic robots.txt that is generated by WordPress. But in some cases this might not be the case.
If you use a static robots.txt file in your website root, you will need to open it in a text editor. If there is already a line with
Sitemap: http://yourblogurl.tld/sitemap.xml you can just leave it like it is. But if there is no sitemap referrence there, add it (adapted to your site url) to make search engines find your XML Sitemap.
Or if you have WP installed in a subdirectory, on a server without rewrite_rules or if you do not use fancy URLs in your Permalink structure settings. In these cases, WordPress will need a little help in getting ready for XML Sitemap indexing. Read on in the WordPress section for more.
My WordPress powered blog is installed in a subdirectory. Does that change anything?
That depends on where the index.php and .htaccess of your installation reside. If they are in the root while the rest of the WP files are installed in a subdir, so the site is accessible from your domain root, you do not have to do anything. It should work out of the box. But if the index.php is together with your wp-config.php and all other WP files in a subdir, meaning your blog is only accessible via that subdir, you need to manage your own robots.txt file in your domain root. It has to be in the root (!) and needs a line starting with
Sitemap: followed by the full URL to the sitemap feed provided by XML Sitemap Feed plugin. Like:
If you already have a robots.txt file with another Sitemap reference like it, just add the full line below or above it.
Do I need to use a fancy Permalink structure?
No. While I would advise you to use any one of the nicer Permalink structures for better indexing, you might not be able to (or don't want to) do that. If so, you can still use this plugin:
Check to see if the URL yourblog.url/?feed=sitemap does produce a feed. Now manually upload your own robots.txt file to your website root containing:
Sitemap: http://yourblog.url/?feed=sitemap User-agent: * Allow: /
You can also choose to notify major search engines of your new XML sitemap manually. Start with getting a Google Webmasters Tools account and submit your sitemap for the first time from there to enable tracking of sitemap downloads by Google! or head over to XML-Sitemaps.com and enter your sites sitemap URL.
Can I change the sitemap name/URL?
No. If you have fancy URL's turned ON in WordPress (Permalinks), the sitemap url that you manually submit to Google (if you are impatient) should be
yourblogurl.tld/sitemap.xml but if you have the Permalinks' Default option set the feed is only available via
Where can I customize the xml output?
You may edit the XML output in
xml-sitemap-feed/feed-sitemap.php but be careful not to break Sitemap protocol compliance. Read more on Sitemaps XML format.
The stylesheet (to make the sitemap human readable) can be edited in
I see no sitemap.xml file in my site root!
The sitemap is dynamically generated just like a feed. There is no actual file created.
I see a sitemap.xml file in site root but it does not seem to get updated!
You are most likely looking at a sitemap.xml file that has been created by another XML Sitemap plugin before you started using this one. Remove that file and let the plugin dynamically generate it just like a feed. There will not be any actual files created.
If that's not the case, you are probably using a caching plugin or your browser does not update to the latest feed output. Please verify.
I use a caching plugin but the sitemap is not cached
Some caching plugins have the option to switch on/off caching of feeds. Make sure it is turned on.
Frederick Townes, developer of W3 Total Cache, says: "There's a checkbox option on the page cache settings tab to cache feeds. They will expire according to the expires field value on the browser cache setting for HTML."
The Google News sitemap is designed to NOT be cached.
I get an ERROR when opening the sitemap or robots.txt!
The absolute first thing you need to check is your blogs privacy settings. Go to Settings > Privacy and make sure you are allowing search engines to index your site. If they are blocked, your sitemap will not be available.
If that did not solve the issue, check the following errors that might be encountered along with their respective solutions:
404 page instead of my sitemap.xml
Try to refresh the Permalink structure in WordPress. Go to Settings > Permalinks and re-save them. Then reload the XML Sitemap in your browser with a clean browser cache. ( Try Ctrl+R to bypass the browser cache -- this works on most but not all browsers. )
404 page instead of both sitemap.xml and robots.txt
There are plugins like Event Calendar (at least v.3.2.beta2) known to mess with rewrite rules, causing problems with WordPress internal feeds and robots.txt generation and thus conflict with the XML Sitemap Feed plugin. Deactivate all plugins and see if you get a basic robots.txt file showing:
User-agent: * Disallow:
Reactivate your plugins one by one to find out which one is causing the problem. Then report the bug to the plugin developer.
404 page instead of robots.txt while sitemap.xml works fine
There is a know issue with WordPress (at least up to 2.8) not generating a robots.txt when there are no posts with published status. If you use WordPress as a CMS with only pages, this will affect you.
To get around this, you might either at least write one post and give it Private status or alternatively create your own robots.txt file containing:
Sitemap: http://yourblog.url/sitemap.xml User-agent: * Allow: /
and upload it to your web root...
Error loading stylesheet: An unknown error has occurred
On some setups (usually using the WordPress MU Domain Mapping plugin) this error occurs. The problem is known, the cause is not... Until I find out why this is happening, please take comfort in knowing that this only affects reading the sitemap in normal browsers but will NOT affect any spidering/indexing on your site. The sitemap is still readable by all search engines!
I see only a BLANK (white) page when opening the sitemap
You might be experiencing an issue with your servers PHP memory limit. In those cases, you should see a messages like
PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted. in your server/account error log file.
This can happen on large sites. To avoid these issues, there is an option to split posts over different sitemaps on Settings > Reading. Try different settings, each time revisiting the main sitemap index file and open different sitemaps listed there to check.
Read more on Increasing memory allocated to PHP (try a value higher than 256M) or ask your hosting provider what you can do.
Can I run this on a WPMU / WP3+ Multi-Site setup?
Yes. In fact, it has been designed for it. Tested on WPMU 2.9.2 and WPMS 3.0.1 both with normal activation and with Network Activate / Site Wide Activate.
Can I run this plugin from /mu-plugins/ on WP3.0 MS or WPMU?
Yes. Upload the complete /xml-sitemap-feed/ directory to /wp-content/mu-plugins/ and move the file xml-sitemap.php one dir up.
- Install PoEdit on your computer.
- Go to this plugins /languages/ directory.
- If there is no .po file that corresponds with your language yet, rename the template translation database xml-sitemap-feed-xx_XX.po by replacing the xx with your language code and XX with your country code.
- Open the .po file of your language with PoEdit.
- Go to Edit > Preferences and on the tab Editor check the option to compile a .mo database on save automatically. Close with OK.
- Go to Catalog > Settings and set your name, e-mail address, language and country. Close with OK.
- Go to Catalog > Update from POT-file and select the main xml-sitemap-feed.pot file. Then accept all new and removed translation strings with OK.
- Now go ahead and start translating all the texts listed in PoEdit.
- When done, go to File > Save to Save.
- Upload the automatically created xml-sitemap-feed-xx_XX.mo database file (where xx_XX should now be your language and country code) to the plugins /languages/ directory on your WordPress site.
- After verifying the translations work on your site, send the .mo file and, if you're willing to share it, your original .po file to email@example.com and don't forget to tell me how and with what link you would like to be mentioned in the credits!
Thanks for sharing your translation :)