Skip to content

Sitemap XML

Gerald McAlister edited this page Dec 5, 2018 · 1 revision

The sitemap.xml file is pretty straightforward, but just in case I've provided documentation for it here. A more detailed documentation of this can be found at sitemaps.org

Properties

There is only one property needed: The urlset.

urlset

  • Type: List of URL objects.
  • Default Value: Empty
  • Description: The list of URL objects to index. See below for the details of this object.

URL Object

The URL object is used to describe the properties of the URL that you want indexed.

Properties

loc

  • Type: URL
  • Default Value: Empty
  • Description: The actual URL location associated with this object.

changefreq

  • Type: Enum with values of: "always", "hourly", "daily", "weekly", "monthly", "yearly", or "never"
  • Default Value: Empty
  • Description: Indicates how often this page changes. Note that this is a hint, not a command, and each search engine may decide whether to use this or not.

priority

  • Type: Float
  • Default Value: 0.5
  • Description: Tells how important this URL is relative to other URLs on your site. This does not tell the search engine how important this page is.

lastmod

  • Type: W3C Datetime
  • Default Value: Empty
  • Description: Tells the last time this page was modified.

Example Configuration

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
  <url>
    <loc>https://www.geraldmcalister.com/index.html</loc>
    <changefreq>weekly</changefreq>
    <priority>0.9</priority>
    <lastmod>2018-11-06</lastmod>
  </url>
  <url>
    <loc>https://www.geraldmcalister.com/projects.html</loc>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
    <lastmod>2018-11-06</lastmod>
  </url>
  <url>
    <loc>https://www.geraldmcalister.com/experience.html</loc>
    <changefreq>monthly</changefreq>
    <priority>0.6</priority>
    <lastmod>2018-11-06</lastmod>
  </url>
  <url>
    <loc>https://www.geraldmcalister.com/contact.html</loc>
    <changefreq>monthly</changefreq>
    <priority>0.7</priority>
    <lastmod>2018-11-06</lastmod>
  </url>
</urlset>

Clone this wiki locally