Try our conversational search powered by Generative AI!

Geta.SEO.Sitemap- Sitewise filter

Vote:
 

Hi,

I have installed Geta.SEO.Sitemaps for Sitemap generator in my application. The tool is working as expected. As this package allows extending the implementations to serve individual requirements, Is there a way to extend the implementation to exclude an entire site itself. I mean in a multisite application, not every site requires sitemap.xml. Is there a way or any classes within Geta.SEO that i can extend & implement to exclude sites?

Regards.

#278435
Apr 13, 2022 18:49
Vote:
 

Hey Farhin,

The sitemap has to be explicitly configured for every site in the Admin -> Tools -> Search engine sitemap settings. Only the sites configured there will have a generated sitemap, so you can exclude any site where you do not wish to have a sitemap.

See the editor guide for more info:
https://github.com/Geta/SEO.Sitemaps/blob/master/docs/editor-guide.md

As a side note, you can also exclude content by using a custom filter:
https://github.com/Geta/geta-optimizely-sitemaps#exclude-content

#278494
Apr 14, 2022 2:21
Farhin - Apr 14, 2022 6:40
Thanks for the respone Ynze.I have gone through the editor guide .However what I am looking out for is some custom implementation wherein i get the filtered sites in the drop-down itself based on a boolean property setting to exclude/include the site on start page(Just like enable content on page level or exclue/include content).Also,the drop-down list of sites include both http&https site wherein in my case is to just use https sites.So I am looking for some custom implementation to get the filtered drop-down list.
I believe having a site level configured filtered list will eliminate the chances of editorial mistakes to generate unwanted or unsecured list of sitemap for a site.
Ynze - Apr 14, 2022 7:33
In that case it's probably best to create a custom build of the Sitemap module. You can clone the github repository, make changes to the dropdown and then build the solution. Have a look at the GetSiteHosts and ShouldAddToSiteHosts methods, which are used to populate the dropdown, in this class:
https://github.com/Geta/SEO.Sitemaps/blob/eebf3007c5004a7351ca5ce59eb6de95c9ff0252/src/Geta.SEO.Sitemaps/module/Views/AdminManageSitemap.aspx.cs#L370
If you don't want to develop a custom build, then you can try to inherit and override these methods.
Vote:
 

I would also like to know if changing these properties on individual pages will make any difference when sitemap.xml is generated especially freqency & priority.I have been trying to change them for some of the pages & running the scheduler to generate the sitemap.xml but cant see any difference.

Here's the page with the sitemap configuration wherein enabled is unchecked along with a different proirity & frequency & the xml output generated still includes the page with priority & freqency other than what it is set.

Also,once a sitemap.xml is generated,on closely looking at the xml file,the priority for pages is different.I would like to know how does this package decide the priority of the page because from what i have seen it is definitely different from the default values & the values that i try to set is definitely not being set.

Looking at https://www.sitemaps.org/protocol.html & some of the best practice articles on sitemap, it is safe to assume that the priority & frequency doesnt make any difference in a search engine result.Rather it consides lastmod for this.However,i would really like to understand how does this package assigns the priority for pages when generating sitemap.xml file.

Regards.

#279327
Edited, Apr 27, 2022 17:22
valdis - Apr 27, 2022 19:20
This is the place where for example Priority is decided for the content - https://github.com/Geta/geta-optimizely-sitemaps/blob/master/src/Geta.Optimizely.Sitemaps/XML/SitemapXmlGenerator.cs#L380. If priority is not set for the content then following logic is used: https://github.com/Geta/geta-optimizely-sitemaps/blob/master/src/Geta.Optimizely.Sitemaps/XML/SitemapXmlGenerator.cs#L477
Farhin - Apr 29, 2022 10:26
Does this mean that the priority is going to set no matter what is set on the individual page settings. Same for frequency which is defaulted to weekly as per the Github links given or did I get this wrong? Also ,even if the Enabled settings of SEO configuration is unchecked (as in the snapshot above), running the scheduled job again still has the page entry in the .xml file.
Should this entry even be in the generated .xml list? If it is going to be there anyway ,is there a point in having this SEO configuration property on page level as this makes no difference when changing the default values? Excluding pages can be handled by path to exclude ,include in sitemap admin settings right?
Vote:
 

Anyways if you have any feedback for the Sitemaps module - please file an issue on module's GitHub repo (https://github.com/Geta/geta-optimizely-sitemaps/issues) and we would be happy to take a look.

#279329
Apr 27, 2022 19:21
Farhin - Apr 28, 2022 6:56
Thanks valdis .I'll include the feedback items for Admin tool extension in Github repo.
Vote:
 

I figured out the issue on why changing SEO configuration settings(enabled, priority & frequency) on individual pages was not reflecting on the generated sitemap.xml
I had renamed SEOSitemaps & so the changed settings was not being considered on the generated sitemap.xml

 [Display(GroupName = Name = "Sitemap Configuration")]
 [UIHint("SeoSitemap")]
 [BackingType(typeof(PropertySEOSitemaps))]
 //NOTE: This property must be named exactly SEOSitemaps or the Geta.SEO.Sitemaps will not use the values set per page
        public virtual string SEOSitemaps { get; set; }

#279468
Apr 29, 2022 16:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.