How to represent a subdomain in sitemap.xml?

Discussion in 'Site Programming, Development and Design' started by jaa17, Nov 29, 2018.

  1. Hi, I have just set up a subdomain and thanks to your knowledge articles it was a breeze. Thanks for that.

    However, the thing I do not understand is how do we put that into the sitemap.xml to let the robots know we want it to be looked at?

    Which is it?

    http://www.mysite.com/mysubdomaindirectory/index.html

    or

    http://mysubdomain.mysite.com/index.html

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset
    xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
    http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    <!-- Main Pages -->
    <url>
    <loc>http://www.mysite.com/</loc>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
    </url>
    <url>
    <loc>http://www.mysite.com/index.html</loc>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
    </url>
    <url>
    <loc>http://www.mysite.com/mysubdomaindirectory/index.html</loc>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
    </url>
    <url>
    <loc>http://mysubdomain.mysite.com/index.html</loc>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
    </url>
    </urlset>
     

Share This Page