0

I have a Django siteframework to create dynamic sitemap.xml sheet.

class NewsSitemap(Sitemap):
    changefreq = "daily"
    priority = 0.8
    protocol = 'https'

    def items(self):
        return News.objects.all()  # news objects 

    def lastmod(self, obj):
        return obj.date_posted

    def Newstitle(self, obj):
        return obj.titleEnglish

    def location(self,obj):
        return '/news/'+ obj.country + '/' +obj.slug

will server create sitemap file only once in a day according to above code ?

If server create sitemap file each time when different user visit , it would take lot of processing power as my database is huge.

anoop
  • 47
  • 1
  • 1
  • 5

1 Answers1

1

A sitemap is an XML file on your website that tells search-engine indexers how frequently your pages change and how “important” certain pages are in relation to other pages on your site. This information helps search engines index your site.

this is for search engines

what you can try is

limit Optional.

This attribute defines the maximum number of URLs included on each page of the sitemap. Its value should not exceed the default value of 50000, which is the upper limit allowed in the Sitemaps protocol.

soField
  • 2,536
  • 9
  • 36
  • 44