Questions tagged [xml-sitemap]

An XML sitemap is an XML file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Questions related to how XML sitemaps affect SEO are off-topic for Stack Overflow. They may be on-topic at the Webmasters Stack Exchange.

An XML sitemap is an XML file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to more intelligently crawl your site. A sitemap tells Google which pages and files you think are important in your site, and also provides valuable information about these files: for example, for pages, when the page was last updated, how often the page is changed, and any alternate language versions of a page.

The standard for the protocol can be found at https://www.sitemaps.org/

Here is the format of a basic XML sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <url>
      <loc>http://www.example.com/</loc>
      <lastmod>2020-01-01</lastmod>
      <changefreq>monthly</changefreq>
      <priority>0.8</priority>
   </url>
</urlset> 
216 questions
2
votes
1 answer

Can i use in ?

As the title can i use tag in to point to my second sitemap? http://website.com/page1
Jeremy John
  • 1,665
  • 3
  • 18
  • 31
2
votes
2 answers

Submit Google sitemap to Google Search console as request

How do I submit a sitemap to Google Search console as a request? I think I'm missing the part where I include my credentials, but it's not clear how to include this in the URL. Everything is set up in search console and I can submit my sitemap…
user984003
  • 28,050
  • 64
  • 189
  • 285
2
votes
0 answers

Is it valid to use "id" attribute in sitemap?

i'm making a google sitemap for my website, there will be some changes in the sitemap (delete,edit) is it valid to use the id attribute in the url tag?
Jed
  • 21
  • 1
2
votes
1 answer

Submitting Sitemap.xml to Google

How frequently it is recommended to generate and upload Sitemap.xml to Google for an e-commerce site where products are added and removed on daily basis? Thanks.
2
votes
1 answer

Why is the Ruby Time Zone Designator formatting in strftime not working?

I am building a sitemap for Google, and want to use Ruby to format the datetime in their recommended format using the W3C standard with the time zone, like this, YYYY-MM-DDThh:mmTZD where TZD is the Time Zone Designator. However the default format…
xiatica
  • 1,546
  • 2
  • 20
  • 24
2
votes
1 answer

Google sitemap HrefLang tag without the main site url

We have websites with multilingual content. e.g. http://www.example.com/about-us/ http://www.example.com/en-HK/about-us/ http://www.example.com/en-GB/about-us/ http://www.example.com/zn-CH/about-us/ We need to configure the hreflang tags in…
Rashmi Pandit
  • 23,230
  • 17
  • 71
  • 111
2
votes
1 answer

XDocument google mobile sitemap tag

i have been searching around but I cannot seem to find any information on this issue. if you go to https://support.google.com/webmasters/answer/34648 it says one must add the mobile tag to your xml for it to be crawled properly. My problem lies in…
2
votes
2 answers

How to create a sitemap.xml file using R and the {XML} package?

I have a vector of links from which I would like to create a sitemap.xml file (file protocol is available from here: http://www.sitemaps.org/protocol.html) I understand the sitemap.xml protocol (it is rather simple), but I'm not sure what is the…
Tal Galili
  • 24,605
  • 44
  • 129
  • 187
1
vote
1 answer

403 Forbidden Error when Downloading XML.GZ File using Polite Package in R

I am trying to download a file from a URL using the polite package in R. Here is the code I am using: library(polite) # URL of the file to download eprice_xml_products_1 <- "https://www.eprice.it/sitemap/https/Sitemap_Elettrodomestici_1.xml.gz" #…
Andrea
  • 105
  • 10
1
vote
0 answers

How to make Robots.txt and Sitemap.xml only accessable through search engine bots

Several website like Quora, Stackechange, and including Stackoverflow (https://stackoverflow.com/sitemap.xml) only access through the search engine crawlers (Google, Yahoo, Bing, etc). How can i do same for my website robots.txt and…
1
vote
1 answer

How to only get the product page url in xml sitemap

I am using Scrapy's xml feed spider sitemap to crawl and extract urls and only urls. The xml sitemap looks like…
user3125823
  • 1,846
  • 2
  • 18
  • 46
1
vote
0 answers

What to use as language and region for Norway in sitemap.xml?

I am unsure what I should use as language/region for norway in my sitemap.xml file. Should I use nb-no or nn-no or just no? https://somedomain.com/
Cudos
  • 5,733
  • 11
  • 50
  • 77
1
vote
2 answers

PHP - Unable to concatenate two variables while generating a php sitemap

while trying to generate dynamic sitemaps, I tried adding two variables in url path, and the line is giving me error this is my sample line: echo "" . $base_url . "category.php?category=" . $subFeaturedPostCatSlug . "&job=" .…
Yaser
  • 15
  • 3
1
vote
0 answers

How to create a sitemap.xml for my localhost website?

I have no idea about XML so please anyone can guide me about it.I want to create a sitemap.xml for my code.
SUSHANT SHETTY
  • 93
  • 1
  • 1
  • 6
1
vote
1 answer

inside a sitemap.xml PHP script?

I'm working on a sitemap plugin for WordPress. You may think why, as there are lot of great sitemap plugins. Well, I wrote one because I needed a sitemap which works for specific categories. I did it... very simple for now, but I'm working daily to…
Jimbox
  • 11
  • 2