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
140
votes
5 answers

What Content-Type value should I send for my XML sitemap?

I thought I should send "text/xml", but then I read that I should send "application/xml". Does it matter? Can someone explain the difference?
Kyle
  • 21,377
  • 37
  • 113
  • 200
25
votes
4 answers

Creating an XML sitemap with PHP

I'm trying to create a sitemap that will automatically update. I've done something similiar with my RSS feed, but this sitemap refuses to work. You can view it live at http://designdeluge.com/sitemap.xml I think the main problem is that its not…
williamg
  • 2,738
  • 6
  • 34
  • 48
16
votes
2 answers

XSLT does not work when I include xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"

My Google sitemap renders well through XSLT fine without the xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" in the < urlset > element, however when included, my foreach statement doesn't work and nothing renders in the template. My code's…
Julian
  • 1,853
  • 5
  • 27
  • 48
13
votes
2 answers

Showing sitemap in google search result

I want to show a sitemap in google's search result. Like - when you search for "cnet" in google, it shows the result of www.cnet.com with a sitemap of some links. something like this- Product reviews and prices, software downloads, and tech news -…
Imrul.H
  • 5,760
  • 14
  • 55
  • 88
11
votes
4 answers

How to create XML sitemap programmatically in c#

I am building an website. Now I want to create its xml site map like google site map. But I want to create it programmatically using C#. Can anybody tell me how I can access the root directory on the web server using base url of my website get all…
Soumita Parui
  • 143
  • 1
  • 2
  • 7
10
votes
6 answers

sitemap for multiple domains of same site

Here is the situation, i have a website that can be accessed from multiple domains, lets say www.domain1.com, www.domain2.net, www.domain3.com. the domains access the exact same code base, but depending on the domain, different CSS, graphics, etc…
Julien
  • 2,217
  • 2
  • 28
  • 49
7
votes
2 answers

How to add custom xml tags to sitemap.xml using mvcsitemapprovider?

Based on what Google defines in Video sitemaps , There are some xml tags should be added to sitemaps for videos, and it should be like this:
6
votes
3 answers

XML sitemap for react app

I have a react app for which I want to add a sitemap.xml. I have added this route to link to the file (XML is my my sitemap.xml): import XML from './sitemap.xml'; I keep getting this error, which…
aiiwa
  • 591
  • 7
  • 27
6
votes
3 answers

Magento and Google Sitemap - Cron

I'm a newbie in Magento. I'm tring to configure an auto-generated Google Site Map. I've read everywhere how to set up cron job for Magento with cPanel, how to configure from backend and so on. My current settings: under System -> Configuration ->…
Mauro
  • 361
  • 1
  • 4
  • 14
5
votes
3 answers

how to make google bots crawl my react website with dynamic urls and display them in google

I have this website were we can create new questions. Whenever a new question is created a new url is generated I want google to crawl my website everytime a new question is added and display it in google. I have my front end in react js and backend…
vivek kn
  • 107
  • 1
  • 18
  • 45
5
votes
2 answers

Adding a sitemap to a VueJS application

I'm using VueJS without using Vue CLI. I would like to add a sitemap.xml to my router but I'm struggling to understand how to use the vue-router-sitemap library. I've tried using the code mentioned but it doesn't specify where it should be…
Michael
  • 3,411
  • 4
  • 25
  • 56
5
votes
1 answer

How to create dynamic URLs in sitemap.xml using angular 2?

How to create dynamic URLs in sitemap.xml using angular 2?. I have tried with npm sitemap package. But i cannot create sitemap.xml. can anyone tell how to to create dynmic urls in angular 2?
4
votes
2 answers

How to serialize google sitemap in c# using XmlSerializer

I want to serialize like this But wrong result generated. My class is here [Serializable] [XmlRoot("urlset")]…
ebattulga
  • 10,774
  • 20
  • 78
  • 116
4
votes
2 answers

How to create dynamic sitemap in Codeigniter

How to create a dynamic sitemap in Codeigniter. I have created a php file in Controller named it Sitemap.php and created a view named it sitemap.php everything is going well but showing the following result not the actual XML file as shown in below…
Upasana Chauhan
  • 948
  • 1
  • 11
  • 32
4
votes
1 answer

Should sitemap index contain child sitemaps with .gz extension?

Question: Is it required to have .gz extension for child sitemaps or not? This is what I found: Google provides the following sitemap index example:
skryvets
  • 2,808
  • 29
  • 31
1
2 3
14 15