I want to generate an XML sitemap for my website.

After a lot of searches I found that the XML file has a lot of tags like loc, lastmod, changefreq, priority etc.

And there's an images sitemap.xml, that has same tags with other tags image:loc etc.

The questions are:

  • How much file content should be? That I need to generate new sitemap file on every update?

  • How much I need to give to a URL on priority and does that impact on organic searches?

  • That I add on the same file every new URL (example: new news) and inform Google and Bing etc. with new modification?

  • That I need to make one sitemap file that content (image sitemap & simple sitemap)?

  • And what I need to pay attention when I want to generate sitemap.xml file?

  • 1
    Could you narrow down your question? As it is, it's very broad and suggests you haven't done any prior research. – GDav Apr 10 '19 at 9:54
  • @GDav On the contrary, I do a lot of search sir, but those questions we can say they are philosophical, so it's difficult to found the answer on the net, you need an expert on the domain to help and answer – sayou Apr 10 '19 at 10:12

You probably don't need an XML sitemap at all. They don't do much for SEO. They can help get your URLs discovered and crawled by search engines, but they don't do much to help rankings. The best way to get your pages ranked is to link to them from other pages. If you are linking from other pages, Googlebot can find them without a sitemap. See The Sitemap Paradox.

An XML sitemap can give you additional insight in Google Search Console and it can help Google figure out which of your URLs your prefer when it finds duplicate content. For those reasons, you may still wish to create a sitemap. If you do so, you really only need the <loc> field. Something like:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

The other fields are optional and Google ignores them. Google has found that most sites don't use the priority, lastmod, or changefreq fields appropriately so Google doesn't use those fields from sitemaps at all.

If you add or remove pages from your site you should generate a new XML sitemap. You can just replace the sitemap with a new one so that you don't need to re-submit it. If you don't want to submit them in the first place, you can add them to your robots.txt file with a line like:

Sitemap: http://www.example.com/sitemap.xml

You don't need an image sitemap to have your images listed in Google image search. Again Googlebot can crawl your site to find those images.

I believe you do need a sitemap to get your videos listed in Google video search, but I don't have much experience there myself.

You also need a sitemap for listings in Google news if you have news articles on your site. Again, I don't have much experience in that area.

| improve this answer | |
  • What I understand from your comments site, that sitemap.xml has no important – sayou Apr 8 '19 at 13:23
  • It is not very important most of the time. – Stephen Ostermiller Apr 8 '19 at 13:24
  • From your experience sir, that I need to add it on my website? When I check my website with SEO tools, always they advice to add sitemap.xml – sayou Apr 8 '19 at 13:25
  • Sitemaps don't usually help indexing or rankings. Many tools suggest them because they are fairly easy to implement and can let you see more about which pages on your site are indexed in Google Search Console. I don't usually recommend implementing them. I have them on a couple of my sites and don't find they add much value for me. On some of my other sites I've never implemented them and it doesn't hurt SEO not to have them. – Stephen Ostermiller Apr 8 '19 at 13:27
  • I know I'm asking a lot, but I really need information, do you advise me to add the sitemap to my website? Or I don't need to care about it? because I'm new on SEO for that I want to do all what I found on the net – sayou Apr 8 '19 at 13:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.