XML Sitemap & Google News for WordPress

XML and Google News Sitemaps to feed the hungry spiders. Multisite, WP Super Cache, Polylang and WPML compatible.

Description

This plugin dynamically creates dynamic feeds that comply with the XML Sitemap and the Google News Sitemap protocol. Multisite, Polylang and WPML compatible and there are no static files created.

There are options to control which sitemaps are enabled, which Post Types and archive pages (like taxonomy terms and author pages) are included, how Priority and Lastmod are calculated, who to ping and a possibility to set additional robots.txt rules from within the WordPress admin.

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.

You, or site owners on your Multisite network, will not be bothered with overly complicated settings like most other XML Sitemap plugins. The default settings will suffice in most cases.

An XML Sitemap Index becomes instantly available on yourblog.url/sitemap.xml (or yourblog.url/?feed=sitemap if you’re not using a ‘fancy’ permalink structure) containing references to posts and pages by default, ready for indexing by search engines like Google, Bing, Yahoo, AOL and Ask. 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. Google and Bing will be pinged 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 (when hungry) spider.

NOTES:

  1. 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.
  2. On large sites, it is advised to use a good caching plugin like WP Super Cache, Quick Cache, W3 Total Cache or another to improve your site and sitemap performance.

Features

  • Compatible with multi-lingual sites using Polylang or WPML to allow all languages to be indexed equally.
  • 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 across your sites pages.
  • Includes XLS stylesheets for human readable sitemaps.
  • Sitemap templates and stylesheets can be overridden by theme template files.

XML Sitemap

  • Sitemap Index includes posts, pages and authors by default.
  • Optionally include sitemaps for custom post types, categories and tags.
  • Sitemap with custom URLs optional.
  • Custom/static sitemaps can be added to the index.
  • Works out-of-the-box, even on Multisite installations.
  • Include featured images or attached images with title.
  • Pings Google, Bing & Yahoo on new post publication.
  • Options to define which post types and taxonomies get included in the sitemap.
  • Updates Lastmod on post modification or on comments.
  • Set Priority per post type, per taxonomy and per individual post.
  • Exclude individual posts and pages.

Google News Sitemap

  • Required news sitemap tags: Publication name, language, title and publication date.
  • Set a News Publication Name or uses site name.
  • Supports custom post types.
  • Limit inclusion to certain post categories.
  • Pings Google on new publications, once per 5 minutes.

Pro Features

Google News Advanced

  • Multiple post types – Include more than one post type in the same News Sitemap.
  • Keywords – Add the keywords tag to your News Sitemap. Keywords can be created from Tags, Categories or a dedicated Keywords taxonomy.
  • Stock tickers – Add stock tickers tag to your News Sitemap. A dedicated Stock Tickers taxonomy will be available to manage them.
  • Ping log – Keep a log of the latest pings to Google with exact date and response status.

Privacy / GDPR

This plugin does not collect any user or visitor data nor set browser cookies. Using this plugin should not impact your site privacy policy in any way.

Data that is published

An XML Sitemap index, referencing other sitemaps containing your web site’s public post URLs of selected post types that are already public, along with their last modification date and associated image URLs, and any selected public archive URLs.

A Google News Sitemap containing your web site’s public and recent (last 48 hours) URLs of selected news post type, along with their publication time stamp and associated image URL.
An author sitemap can be included, which will contain links to author archive pages. These urls contain author/user slugs, and the author archives can contain author bio information. If you wish to keep this out of public domain, then deactivate the author sitemap and use an SEO plugin to add noindex headers.

Data that is transmitted

Data actively transmitted to search engines is your sitemap location and time of publication. This happens upon each post publication when at least one of the Ping options on Settings > Writing is enabled. In this case, the selected search engines are alerted of the location and updated state of your sitemap.

Contribute

If you’re happy with this plugin as it is, please consider writing a quick rating or helping other users out on the support forum.

If you wish to help build this plugin, you’re very welcome to translate it into your language or contribute code on Github.

Credits

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.

Installation

WordPress

I. If you have been using another XML Sitemap plugin before, check your site root and remove any created sitemap.xml, sitemap-news.xml and (if you’re not managing this one manually) robots.txt files that remained there.

II. Install plugin by:

Quick installation via Covered Web Services !

… OR …

Search for “xml sitemap feed” and install with that slick Plugins > Add New admin page.

… OR …

Follow these steps:

  1. Download archive.
  2. Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favourite FTP client to the /plugins/ folder.

III. Activate the plugin on the Plugins page.

Done! Check your sparkling new XML Sitemap by visiting yourblogurl.tld/sitemap.xml (adapted to your domain name of course) 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.

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.

Uninstallation

Upon uninstalling the plugin from the Admin > Plugins page, plugin options and meta data will be cleared from the database. See notes in the uninstall.php file.

On multisite, the uninstall.php can loop through all sites in the network to perform the uninstalltion process for each site. However, this does not scale for large networks so it only does a per-site uninstallation when define('XMLSF_MULTISITE_UNINSTALL', true); is explicitly set in wp-config.php.

Frequently Asked Questions

Where are the options?

On Settings > Reading you can enable the XML Sitemap Index and (if needed) the Google News Sitemap. There is also an Additional robots.txt rules field.

Once a sitemap is enabled, its options can be found on Settings > XML Sitemap or on Settings > Google News.

Ping settings can be found on Settings > Writing.

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 Search Console account to check its validity and performance. Create an account if you don’t have one yet.

Can I manipulate values for Priority and Changefreq?

You can find default settings for Priority on Settings > XML Sitemap. A fixed priority can be set on a post by post basis too.

Changefreq has been dropped since version 4.9 because it is no longer taken into account by Google.

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 by default.

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 > Writing.

Do I need to change my robots.txt?

In normal circumstances, if you have no static 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 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:
Sitemap: http://yourblogurl.tld/subdir/sitemap.xml

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 Search Console 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 is yourblogurl.tld/sitemap.xml but if you have the Permalink Default option set the feed is only available via yourblog.url/?feed=sitemap.

I see no sitemap.xml file in my site root!

There is no actual file created. The sitemap is dynamically generated just like a feed.

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.

Then, you might want to make sure that there is at least ONE post published. WordPress is known to send 404 status headers with feed requests when there are NO posts. Even though the plugin tries to prevent that, in some cases the wrong status header will get sent anyway and Google Search Console will report a vague message like:

We encountered an error while trying to access your Sitemap.
Please ensure your Sitemap follows our guidelines and can be
accessed at the location you provided and then resubmit.

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 known 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!

XML declaration allowed only at the start of the document

This error occurs when blank lines or other output is generated before the start of the actual sitemap content. This can be caused by blank lines at the beginning of wp-config.php or your themes functions.php or by another plugin that generates output where it shouldn’t. You’ll need to test by disabling all other plugins, switching to the default theme and manually inspecting your wp-config.php file.

I see only a BLANK (white) page when opening the sitemap

There are several cases where this might happen.

Open your sitemap in a browser and look at the source code. This can usually be seen by hitting Ctrl+U or right-click then select ‘View source…’ Then scan the produced source (if any) for errors.

A. If you see strange output in the first few lines (head tags) of the source, then there is a conflict or bug occuring on your installation. Please go to the Support forum for help.

B. If the source is empty or incomplete then you’re probably 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 > XML Sitemap. 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+ both with normal activation and with Network Activate / Site Wide Activate.

625 Comments

Great, great plugin, but I have a question: all of my news articles are in the /news section, not blog posts. But the news sitemap only sucks in post-type articles. Any easy way to hack the plugin so that the news sitemap pipes in news articles only? Thanks!

Hi Michael, it sounds like you have a dedicated post type for news posts. Is that correct? Then you will need to upgrade to the current development version which allows you to select multiple post types to be included in the news sitemap… Get it from http://wordpress.org/plugins/xml-sitemap-feed/developers/ under Other Versions and install it via FTP overwriting the current plugin files.

Hello,
My site is http://www.MyOldOhioHome.com. I have WordPress in the root directory. The plugin has worked well.

Now I have added a subdirectory called /databases/related/ to hold some .html files.

I added this line to the plugin settings for “Include custom URLs”
http://myoldohiohome.com/databases/* 0.5
I added this line to the settings for “Additional allowed domains”
myoldohiohome.com/databases/

Will this work? Will the plugin find the html files in the /databases/related/ directory and direct search engines to them? Or should I do something else?
Thank you,
Ed Hamilton

Hi Ed, under additional allowed domains you do not need to add anything because all these external pages live in the same domain (myoldohiohome.com) but the wildcard in /databases/* will not work. The plugin is not going to scan the actual directory for html files. Instead, you will need to add each url manually on a new line. Start with http://myoldohiohome.com/databases/related/index.html and so on…

Hi Ed, the XML Sitemap Feed plugin will not be scanning any directories so it will not ‘find’ external / stand-alone pages that live outside WordPress on its own. But you can add external pages manually in the “Include custom URLs” field.

This can be handy in cases like yours, unless these external pages are created with another CMS that has its own sitemap available or if there are so many that it’s just too complicated to manage them manually 😉

Hello thanks for this great plugin

We just started using this plugin on our website. I was reading the previous comments about conflicts once I have this plugin does it conflict with any other plugin that I may have that generates robots.txt files? I currently have the wp robots.txt plugin that helps me to edit the robots.txt file in the admin settings. Do I need to disable or delete this?

Also I was hoping that this plugin would enable our website to display our page structure in search results. Currently it displays our menu will this plugin have anything to do with it or is it something else that we are using.

Thank you so much for all your help 🙂

Hi Hellen, no there should be no real problem between my plugin and that other plugin. Just be aware that the robots.txt content field on your Settings > Reading page (coming from my plugin) will not have any effect because (I suppose) that other plugin creates a static robots.txt file.

Also I was hoping that this plugin would enable our website to display our page structure in search results. Currently it displays our menu will this plugin have anything to do with it or is it something else that we are using.

Are you talking about rich snippets / structured data or about sitelinks? In any case, no this plugin only creates the xml sitemaps. No tags or anything is added to web pages.

It’s a great plugin, however I currently have a problem where posts are duplicated and showing as pages in the page xml. I don’t know how I have managed to do that. I deleted and reinstalled but still wont change. I hope that hasn’t affected anything with search engines.

Thanks if can help.

Hi Squillions, I’m not seeing a page xml activated on your domain. Could you please activate Pages for sitemaps inclusion, so I can take a look?

Hi Squillions, amazing but I’ve never seen that. Nor can I reporduce it on any of my sites (thought it might be the permalinks but no) … To find out where the conflict lies, you might try to (1) upgrade to the current development version from http://wordpress.org/plugins/xml-sitemap-feed/developers/ then (2) disable other plugins and finally if all that fails (3) switch to the default theme… If you find out what the conflicting plugin (or theme) is, please let me know so I can reproduce the issue and maybe find a way around it 🙂

Also, I notice that you are using a custom post type “Noticias” instead of the regular “Posts”. May I ask why? In any case, that explains the empty news sitemap since that only takes Posts… But I’ll consider custom post types as a feature request 🙂

Having trouble all of the sudden with a site. The regular maps are working correctly, but I’m getting a 404 on the news sitemap unless I pull it up with the query string. I thought you might have some suggestions on this as nothing has changed elsewhere I can think of.

RavanH thank you very much!

It is already working perfectly. Congratulations again for your work with this plugin

Hi Yves, the Standout tag is not implemented yet. I’ll consider this a feature request 🙂

Hi. I installed the plug in and it was working fine until yesterday. Now when I view the news sitemap I get a 404 error, which reflects in Google News’ error in webmaster tools. Why the sudden not working. I went back to the settings and double checked, but still a 404 error. I’m not technical, so any help is appreciated.

Hi, is the News Sitemap still available via the non-pretty URL /?feed=sitemap-news ? If so, you might need to resave your Permalink settings. Go to Settings > Permalinks and simply save the settings as they are.

A great plugin, thank you!

Do you know if there is a list of ‘official’ values for the Google News Country field? I don’t know whether to put England, the UK, the United Kingdom, or Great Britain…

Thanks
James

Hi James, searching for such a list I found none. On this page http://www.verticalleap.co.uk/blog/how-to-create-a-google-news-sitemap/ there is an example using UK so I’d go for that.

But it might actually make no difference because what I noticed during my search is that on the official Google News page https://support.google.com/news/publisher/answer/74288 (which does come up when searching for “google news geo_locations tag”) the whole geo_locations tag section has been removed! And although I have seen no official statement, it actually looks like Google is silently dropping support for this tag altogether…

Hi Ravan – thanks for taking the time to look into this, it’s much appreciated! I think I will continue to use the geo_locations tag even if it has been dropped, because it only takes a couple of seconds and you never know, it might make a comeback…

Hi James, you are right. No sense in dropping the use of the geo tag until official notice from Google News.

I’ve created the thread https://productforums.google.com/forum/#!mydiscussions/news/CKXxnNdyVCU about this on the Google support forums (right after you posed your question here) but have not received any reply, let alone an official statement. Feel free if you want to chip in. It might create a little more visibility to the issue as it deserves some attention. Unlikely that you’re the only one to use the geo tag. 😉

hello, my webmaster tools write me this message.

Warnings
URLs not accessible
When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot due to an HTTP status error. All accessible URLs will still be submitted.
1
Sitemap: batumicheck.in/sitemap-home.xml
HTTP Error: 404
URL: http://batumicheck.in/ru/

can you hellp me?
sorry for my bad english

Hi irakli, when I visit http://batumicheck.in/ru/ in a regular browser I get a normal 200 OK status response. I have no explanation why Google bot would get a 404. Are you using any custom htaccess rules that only apply to google bot only? Are you using any (security) plugins that alter response headers for certain requests? It is certainly not my plugin that does that…

You might also want to test with a Bing Webmaster Tools account.

Hi RavanH,

I installed your plugin, was a smooth install and a very well documented install and FAQ page. When I added a dummy content and filled all the Google news’ fields and published it, it’s not appearing on the /sitemap-news.xml. What could the problem be? I filled in all the required fields, but still no luck. Do I have to add the feature image? I tried both checking and leaving it unchecked the “Exclude from XML sitemap” still no luck. I use WP super cache plugin, is that the one causing this problem? My WordPress is the latest one.

Please Help!

Thanks,
~Esh

Hi Eshwar, WP Super Cache should not be caching the news sitemap. Did you make sure to remove any static sitemap(-news).xml files from your site root? Is the non-pretty URL /?feed=sitemap-news showing different content or is it the same?

Take a look at the source code of the sitemap (if you don’t know how, you can use a service like http://web-sniffer.net/ where checking the box ‘Raw HTML View’ will show you the source along with all other valuable request/response header data) and make sure there is no WP Super Cache timestamp. If a timestamp is there, then WP Super Cache might be serving a cached version.

Or share a link and I’ll take a look 🙂

Hi RavanH,

The non-pretty URL gets the news item upon publishing added to it’s list. But the sitemap-new.xml doesn’t. I checked the source and the wp cache timestamps are there. I cleared the cache yet, it isn’t working. On the other hand the sitemap.xml works fine even with the wp cache active and caching it. Now, what could the problem be? The sitemap-news.xml doesn’t get the new item thats added. One last thing I could try is disabling the wp cache plugin. Could this be the wordpress 3.9.1 thing? Should the plugin be updated to the current wordpress version?

My link is http://www.knolpad.com/sitemap-news.xml

Thanks for your reply RavanH,

Hi Eshwar, if you compare the two URLs (non-pretty and pretty) you will notice the output looks different. That is because the one on /sitemap.-news.xml is not from my plugin but from Arne Brachhold’s xml sitemap generator. Make sure you uninstall that plugin and remove any static xml files that it left behind in the site root.

Ty RavanH for clearing that up 🙂 Will remove Arne Brachhold’s plugin. But what about my sitemap.xml? What plugin is compatible with yours so I can have have a sitemap.xml for my how-to contents?

This very same XML Sitemap Feeds plugin that you are using for the news sitemap does regular sitemaps too. In fact, the sitemap index is already present on http://www.knolpad.com/?feed=sitemap … It can also include custom post types if you select the appropriate box on Settings > Reading. Just make sure you delete (via FTP) really all the static .xml files that the other plugin created in your site root.

I deleted Arne’s sitemap plugin. cleared the wp cache, removed and reinstalled your plugin. Problem SOLVED! Thanks RavanH for your time so far. much appreciated, will donated you after uploading funds to my credit card. This is my way of saying thanks and long live this plugin.

Hi Eshwar, glad to hear you got it working 🙂

…so I can have have a sitemap.xml for my how-to contents?

Is that a custom post type? If so, don’t forget to check the appropriate post type box on Settings > Reading.

RavanH, I removed Arnie Brachhold’s sitemap generator, I selected show hidden files in my Filezill FTP client, couldn’t find the raw sitemap files, both regular and news, but when I go to that sitemap URL now, the files aren’t there, it redirects to the homepage. We are close now, now I got to make your plugin to generate sitemaps. Thanks for your help so far RavanH! much appreciated 🙂

Hi Eshwar, glad to hear you got it working 🙂

…so I can have have a sitemap.xml for my how-to contents?
Is that a custom post type? If so, don’t forget to check the appropriate post type box on Settings > Reading.

Thanks RavanH,

My post is not custom post. It has no variable passing. My job is finished RavanH. I got the sitemap.xml for how-to contents and sitemap-news.xml for news. Thanks for your help so far, much appreciated.

Hi Asteric, do not forget to remove the static sitemap.xml file from your site root via FTP!

Hi!
WordPress Version: 3.9.1
Plugin Version: 4.3.2

When I try open page kontaktnye-linzy.by/sitemao.xml I get 404

WordPress is known for behaving strangely in respect to feeds when there are no posts at all. Could you try publishing at least one post? It can have a date in the far past, it does not matter…

In that case, I advise to leave that (or another) post published but disable the “Post” option at “Include post types” under the Sitemap settings on Settings > Reading.

I’ll try (again) to find a way around this 404 behavior that WordPress displays regarding feeds when there are no posts. But I fear it cannot be prevented…

Hi Vamien, not in the current stable version. It is planned as a simple option for a future release but at this point you could simply try setting a publish date of more than 49 hours ago.

The option to not publish an post in the Google News sitemap or be able to select which categories for news to publish.

The option to select categories is in the development version. It will be released after some more tweaks and more testing proabaly end of this month…

I have not done a lot of testing but does the plugin use CDATA blocks for or in the google news sitemap and the and in the main sitemap?

My tags got stripped from the last comment so let me try again
CDATA for the following tags?
< image:caption > < image:title > < news:title > < news:caption >

Hi Tony, in the current dev version, the image:title and image:caption are wrapped in CDATA tags. The news:caption tag does not exist in this plugin (do you have documentation for such a tag? google makes no mention of it…) but news:title is consecutively run through the PHP’s strip_tags and the WordPress internal filters ent2ncr and esc_html.

Are you experiencing problems? Please let me know because it’s virtually impossible to test all use cases…

If you need to share code snippets, maybe the forum on http://wordpress.org/support/plugin/xml-sitemap-feed is more suitable. If you want to share a link privately, please use the contact form.

Thanks for your input 🙂

Awesome, I am using the current stable version so I did not see that the development version used CDATA and the news:title is cleaned. I did try using both sitemaps from your plugin (ver 4.3.2) and Yoast WordPress SEO (ver 1.6) and saw that your sitemap pulls a lot more images from the posts compared to WordPress SEO. Is there a reason for that and it seems like it would be much better to pull more images?

Yoast sitemap: http://www.dairyfreeandfit.com/post-sitemap.xml
XML & Google News Sitemaps: http://www.dairyfreeandfit.com/sitemap.xml

Hi Tony, no idea why Yoasts sitemap would skip some images. And I don’t know how it pulls these images either.

My plugin simply adds images that are either featured or attached images depending on the plugin settings. Please note this has a limitation: images that have been set as featured image usually are visible on the public side (no problem there) but not always are all attached images actually inserted into a post or page. Still they will be listed in the sitemap. Or the attached image can be used in anther post (too) but it will not be listed with that posts entry. You can expect Google to figure it out and I have no evidence that this is a problem (in the eyes of the search giant) but still you may not want this to happen.

In the news sitemap, I recommend using the featured image because otherwise Google News will pick one image randomly.

hi,

i see the site map when i visit thru a browser. But google webmaster tools says error “Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.”

Any help would be appreciated

Hi Blake, try your sitemap with “Fetch as Google” in your Webmaster Tools account to see if there is indeed the XML source of your sitemap visible. I’ve seen hacked sites that redirect only Google bot to other domains… Else, can you share a link to your sitemap?

So in Fetch as Google i added site map.xml

The result was Completed.

Do i need to hit the box that says submit to index?

I clicked the link and this is what google sees


Downloaded HTTP response:

HTTP/1.1 200 OK
Date: Thu, 25 Sep 2014 20:10:53 GMT
Server: Apache
X-Powered-By: PHP/5.3.28
X-Pingback: http://www.hangardoors.aero/xmlrpc.php
ETag: "57fb22d3a901c6f9c9a3add0e67c1282"
Last-Modified: Sat, 20 Sep 2014 12:45:48 GMT
Keep-Alive: timeout=2, max=100
Connection: Keep-Alive

Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8








http://www.hangardoors.aero/sitemap-home.xml
2014-09-19T17:05:05+00:00


http://www.hangardoors.aero/sitemap-posttype-post.xml
2014-09-09T13:34:24+00:00


http://www.hangardoors.aero/sitemap-posttype-page.xml
2014-09-20T12:45:48+00:00


http://www.hangardoors.aero/sitemap-posttype-portfolio.xml
2014-09-17T20:19:11+00:00


http://www.hangardoors.aero/sitemap-taxonomy-category.xml
2014-09-09T13:34:24+00:00


http://www.hangardoors.aero/sitemap-taxonomy-post_tag.xml
2014-09-09T13:34:24+00:00


Download Time: 0.568 seconds

Hi Blake, the comments are not really suited for pasting code (got chewed up) but it looks like your sitemap is OK. However, the response header “Last-Modified: Sat, 20 Sep 2014 12:45:48 GMT” looks like Google might be keeping an old sitemap instead of fetching the correct version. Do you have any new posts to publish? If not, could you modify (just open for editing and save again) a post or page? It should reset the last modified date. Then use the Test Sitemap in GWT to see if the error is solved…

Hey.

I was really happy to have found your plugin, only great comments. I installed, went through the settings, saved, checked my sitemap. EMPTY! 🙁

I couldn’t find a strange output in the first few lines as suggested nor the PHP Fatal error.

I have never changed anything in the editor/css and my theme is compatible with your plugin.

Please, do you have any ideas? Do you need more infos from me?

Thanks a lot!

Janine

Hi Janine, can first go to Settings > Permalinks and resave the settings you have. Then check again. ALso try to see if the sitemap is available on the non-pretty URL yoursi.te/?feed=sitemap … let me know how that turns out 🙂

Just curious if time zones matter in Google News sitemaps?
I noticed the news sitemap uses GMT and wondered if specifying a time zone matters?
2014-10-11T15:38:50+00:00
or
2014-10-11T08:38:50-07:00

Hi Tony, timestamps in the new sitemap could be in local time but Google should be able to convert the GMT time (as used now) to your local time without issues. In fact, I would not be surprised if Google News actually does the reverse first when you feed it local timestamps…

Or are you experiencing problems? If so, please let me know!

No problems, I was just curious if Google used timestamp in anyway for location or any other purpose. The way you have it is probably more appropriate.

Hmmm, no not that I’m aware of. Which timezone is used does not really matter (anymore) as long as it is clear to Google which one is used. I think I’ll make the plugin switch to local time in the next update because that is less confusing to site owners while Google will (should) not mind… Thanks for pointing this out 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.