If people want to save space in their sitemaps, they should be able to exclude any of the priority, changefreq, or lastmod tags. Also we should give them the option of the formatting used in lastmod (either full DATE_W3C or just YYYY-MM-DD).

Comments

dave reid’s picture

Title: Add advanced optinos to control what <url> elements are included » Add advanced options to control what <url> elements are included
vood002’s picture

Subscribing to this issue. Currently hacking the module to set all change frequencies to weekly.

EDIT--

Just noticed this is for 7.x. Hopefully this is also planned for 6.x....

dave reid’s picture

I don't really see that this is important. The values are only just suggestions to the search engines.

dave reid’s picture

Status: Active » Postponed
vood002’s picture

Maybe not that important...it's part of our SEO strategy to have these uniform however, so I'm now overriding these fields with hook_xmlsitemap_link_alter() like so:

<?php
function custom_xmlsitemap_link_alter(&$link){
    unset($link['lastmod']);
    $link['changefreq'] = 86400;
}
?>

Again not a pressing issue, however it isn't possible to override changefreq using this hook b/c it will be reset based upon lastmod later in the process. Being able to set whether or not to calculate changefreq based on lastmod would be handy, I won't change the status of this thread though.

srahul07’s picture

May I know the reason behind not allowing having the change frequency as a global setting for a content type like we have for the frontpage.

I have a content type product, and there are more than 10K products on the site. All of the products are being marked as a changefreq 'yearly', whereas we need to have it as 'weekly'.

I have tried various options, but could not succeed. I also tried to create a custom link and give it a priority, and thought of if I create a link like 'mysite.com/content/*' (since all of the products are having url like this) it should work, but it gave me error that the url is not correct. Seems it needs the exact URL of a product and it wont be possible for me to do this for each and every product considering the number of products which may increase in future.

I searched for the option to do this but could not succeed. Can anyone please let me know if there is any way of achieving it?

kurtismccartney’s picture

Where should this codefix go?

Tiggsy’s picture

I fixed it by downloading the map, using an editor to find and remove all <changefreq>.*</changefreq> , but obviously a proper fix is required.

6 years (or more?) seems a wee bit excessive.

dave reid’s picture

Issue summary: View changes
Status: Postponed » Closed (duplicate)
Related issues: +#2416897: Allow disabling output of lastmod, changefreq, and priority in sitemaps

This is a duplicate of #2416897: Allow disabling output of lastmod, changefreq, and priority in sitemaps which is actually available in the latest release.