XML Sitemap & Google News feeds

XML Sitemap & Google News feeds

Install now

Download Version 4.7.5

Requires WordPress: 3.2 or higher
Compatible up to: 4.7.1
Downloads: 831358

Rating: 4.1 out of 5 stars
# Votes: 34

This plugin dynamically creates feeds that comply with the XML Sitemap and the Google News Sitemap protocol. Multisite, Polylang and WPML 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.

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 and XML sitemap values like ChangeFreq and URL Priority are auto-calculated based on post age and comment activity.

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 can 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 or W3 Total Cache to improve your site and sitemap performance.

Features

XML Sitemap

  • Sitemap Index with optional inclusion of sitemaps for post types, categories and tags.
  • Sitemap with custom URLs optional.
  • Custom/static sitemaps can be added to the index.
  • 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 Multisite installations.
  • Optionally include Image tags with caption and title for featured images or attached images.
  • Pings Google, Bing & Yahoo, Yandex and Baidu 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.
  • Exclude individual posts or pages.

Google News Sitemap

  • Optionally include Image tags with caption and title for featured images or attached images.
  • Options to: set a different News Publication Name, include custom post types or limit inclusion to certain post categories.
  • Configure , and tags both globally and post by post
  • Pings Google on new publications.

More

  • 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 accross your sites pages.
  • Includes XLS stylesheets for human readable sitemaps.

Translations

New transtations will be accepted and listed here. See translation instructions under Other Notes.

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.

Commercial message:

Screenshots

  1. xml-sitemap-feed screenshot 1

    XML Sitemap feed viewed in a normal browser. For your eyes only 😉

  2. xml-sitemap-feed screenshot 2

    XML Sitemap source as read by search engines.

Frequently Asked Questions

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 whip up some fresh chow 😉
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:

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 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 yourblog.url/?feed=sitemap.
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 xml-sitemap-feed/sitemap.xsl.php.

Note: your modifications will be overwritten upon the next plugin upgrade!

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 Webmaster Tools 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 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!

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 > 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+ both with normal activation and with Network Activate / Site Wide Activate.

Download

Latest version: Download XML Sitemap & Google News feeds 4.7.5 [zip]
Downloaded 831358 times.

Rated 4.1 out of 5 stars with a total of 34 votes on WordPress.org »

515 thoughts on “XML Sitemap & Google News feeds

    1. RavanH Post author

      Hi Mladen, qTranslate is kind of hard to integrate in the sense that I find it somewhat unpredictable (across updates) plus I don’t use it any more and it’s a lot of work to keep a multi-lingual test site around just for that. That said, XML Sitemap Feeds was once compatible with qTranslate (and even Xlanguage) and I might find some time to do basic testing to see if I can bring that old code back to life… Anyway, I recommend Polylang to all users and clients alike since it is a lot less heavy on the server and does not slow down WordPress response times as much. And I will very likely keep my plugins compatible with Polylang at all times 🙂

      Reply
      1. Mladen

        Many thanks for fast reply RavenH. I fully understand your standings, I just can not believe that there is no free multi-lingual solution with translated urls and sitemap for WordPress…

        Reply
        1. RavanH Post author

          Well, with XML Sitemap Feeds + Polylang you get exactly that! It’s a bit of a hassle migrating (copy/pasting every translation to a new post) but after that you’ll be happy as a fish in a cool pond. 🙂

          Reply
  1. Pingback: Сумма технологий | Мятамята

  2. Michael Nace

    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!

    Reply
    1. RavanH Post author

      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.

      Reply
  3. Ed Hamilton

    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

    Reply
    1. RavanH Post author

      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…

      Reply
    1. Ed Hamilton

      Thank you for the help. I now realize that I need a separate sitemap for that sub-directory, since it contains files that are not generated by WordPress. So that is what I will do.

      Reply
    2. RavanH

      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 😉

      Reply
  4. Hellen O.

    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 🙂

    Reply
    1. RavanH Post author

      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.

      Reply
  5. Squillions

    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.

    Reply
    1. RavanH Post author

      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?

      Reply
        1. RavanH Post author

          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 🙂

          Reply
    1. RavanH

      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 🙂

      Reply
  6. Guru

    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.

    Reply
      1. rakkh

        RavanH thank you very much!

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

        Reply
    1. RavanH Post author

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

      Reply
  7. blogcriticsorg

    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.

    Reply
    1. RavanH

      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.

      Reply
      1. jay

        Hi,
        thanks for the fast reply.
        i use it for google news, disabled the other sitemap.
        I am talking of he options like google news category, city, etc

        Reply
  8. James Clark

    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

    Reply
    1. RavanH Post author

      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…

      Reply
      1. James Clark

        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…

        Reply
        1. RavanH

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

          Reply
  9. irakli

    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

    Reply
    1. RavanH Post author

      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.

      Reply
  10. eshwariyer

    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

    Reply
    1. RavanH

      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 🙂

      Reply
  11. Pingback: Plugins de WordPress que no pueden faltar en tu sitio web Altura Interactive Español

  12. eshwariyer

    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,

    Reply
    1. RavanH Post author

      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.

      Reply
      1. eshwariyer

        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?

        Reply
        1. RavanH Post author

          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.

          Reply
          1. eshwariyer

            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.

          2. RavanH

            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.

  13. eshwariyer

    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 🙂

    Reply
    1. eshwariyer

      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.

      Reply
    1. RavanH Post author

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

      Reply
  14. wbtk

    Hi!
    WordPress Version: 3.9.1
    Plugin Version: 4.3.2

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

    Reply
        1. RavanH Post author

          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…

          Reply
    1. RavanH

      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…

      Reply
    1. RavanH

      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.

      Reply
  15. Pingback: Submitting your WordPress site to Google News

  16. Tony

    Any word on when the next stable release will be available with the options for Google news sitemaps?

    Great plugin!

    Reply
      1. Tony

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

        Reply
        1. RavanH Post author

          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…

          Reply
          1. Tony

            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?

  17. Tony

    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 >

    Reply
    1. RavanH Post author

      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 🙂

      Reply
      1. Tony

        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

        Reply
        1. RavanH Post author

          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.

          Reply
  18. Pingback: Endless Web Solutions: 3 Quick WordPress SEO Tips – Endless Web Solutions

  19. Blake

    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

    Reply
    1. RavanH

      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?

      Reply

Leave a Reply