<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harry A</title>
    <description>The latest articles on DEV Community by Harry A (@crawly).</description>
    <link>https://dev.to/crawly</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4270815%2F1c74eb5c-b651-4855-b551-e816a4d90109.png</url>
      <title>DEV Community: Harry A</title>
      <link>https://dev.to/crawly</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/crawly"/>
    <language>en</language>
    <item>
      <title>How to Create an XML Sitemap (Step by Step)</title>
      <dc:creator>Harry A</dc:creator>
      <pubDate>Sat, 28 Nov 2026 13:59:08 +0000</pubDate>
      <link>https://dev.to/crawly/how-to-create-an-xml-sitemap-step-by-step-3ef7</link>
      <guid>https://dev.to/crawly/how-to-create-an-xml-sitemap-step-by-step-3ef7</guid>
      <description>&lt;p&gt;Want to create an XML sitemap for your website? Most platforms make one for you, and for every other site you can generate one in a few minutes without installing anything. This guide shows how to find or create a sitemap on WordPress, Shopify, Wix, Squarespace and Blogger, and how to make one for a custom-built website.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you start: does your site already have a sitemap?
&lt;/h2&gt;

&lt;p&gt;Many website builders and CMSs create a sitemap automatically. Before making a new one, open &lt;code&gt;https://yourdomain.com/sitemap.xml&lt;/code&gt; in your browser, or enter your domain in a free &lt;a href="https://xmlsitemapgenerator.net/sitemap-finder" rel="noopener noreferrer"&gt;sitemap finder&lt;/a&gt;, which checks robots.txt and 30 common locations at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to create a sitemap on popular platforms
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Sitemap address&lt;/th&gt;
&lt;th&gt;What you need to do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;WordPress (built-in)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/wp-sitemap.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Nothing. WordPress 5.5 and newer create it automatically.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WordPress + Yoast SEO&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/sitemap_index.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Turn on XML sitemaps in Yoast's settings (on by default).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WordPress + Rank Math&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/sitemap_index.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enable the Sitemap module.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shopify&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/sitemap.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Nothing. Created and updated automatically.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wix&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/sitemap.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Nothing. Generated once your site is published.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Squarespace&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/sitemap.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Nothing. Generated automatically.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blogger&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/sitemap.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Nothing. Blogger publishes one for your posts.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If your platform already makes a sitemap, skip to submitting it to Google Search Console. If not, or if you have a custom, static or hand-coded website, use one of the methods below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1: Use a free sitemap generator
&lt;/h2&gt;

&lt;p&gt;This is the fastest way for any website. A crawler-based &lt;a href="https://xmlsitemapgenerator.net/" rel="noopener noreferrer"&gt;XML sitemap generator&lt;/a&gt; visits your site like a search engine and builds the file for you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enter your homepage address, for example &lt;code&gt;https://example.com&lt;/code&gt;. Use the exact version visitors see: https, and with or without &lt;a href="http://www" rel="noopener noreferrer"&gt;www&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Choose your options. Set the maximum number of pages, keep the last modified date on, and include images if they matter for your site.&lt;/li&gt;
&lt;li&gt;Generate the sitemap. Redirects, error pages and noindex pages should be left out.&lt;/li&gt;
&lt;li&gt;Download &lt;code&gt;sitemap.xml&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Method 2: Build a sitemap from a list of URLs
&lt;/h2&gt;

&lt;p&gt;If your site can't be crawled (it's behind a login, still in development, or its links load with JavaScript), build the sitemap from a list instead: paste one full URL per line into a generator that accepts a list, and download the file. Every URL should be the final address you want in Google.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 3: Write the sitemap by hand
&lt;/h2&gt;

&lt;p&gt;For a very small site you can write the file in any text editor. Save it as &lt;code&gt;sitemap.xml&lt;/code&gt; with UTF-8 encoding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;urlset&lt;/span&gt; &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.sitemaps.org/schemas/sitemap/0.9"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;url&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example.com/&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;lastmod&amp;gt;&lt;/span&gt;2026-11-20&lt;span class="nt"&gt;&amp;lt;/lastmod&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;url&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example.com/services&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;lastmod&amp;gt;&lt;/span&gt;2026-11-01&lt;span class="nt"&gt;&amp;lt;/lastmod&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/urlset&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write special characters correctly: an &lt;code&gt;&amp;amp;&lt;/code&gt; in a URL must be written as &lt;code&gt;&amp;amp;amp;&lt;/code&gt;, or the whole file becomes invalid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Upload the sitemap
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open your hosting file manager or FTP client (cPanel, Plesk, FileZilla and similar).&lt;/li&gt;
&lt;li&gt;Upload &lt;code&gt;sitemap.xml&lt;/code&gt; to your root folder, usually &lt;code&gt;public_html&lt;/code&gt; or &lt;code&gt;www&lt;/code&gt;, so it opens at &lt;code&gt;https://yourdomain.com/sitemap.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Open that address in your browser and check it shows XML, not an error page.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 5: Check the sitemap for errors
&lt;/h2&gt;

&lt;p&gt;One mistake can stop Google from reading the whole file. Run it through a &lt;a href="https://xmlsitemapgenerator.net/sitemap-checker" rel="noopener noreferrer"&gt;sitemap checker&lt;/a&gt; that validates the XML, every URL and every date, and can test a sample of the listed pages for errors, redirects and noindex tags.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Tell search engines about it
&lt;/h2&gt;

&lt;p&gt;Submit the sitemap in Google Search Console and Bing Webmaster Tools, and add a &lt;code&gt;Sitemap:&lt;/code&gt; line to your robots.txt so every search engine can find it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sitemap: https://yourdomain.com/sitemap.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Keep your sitemap up to date
&lt;/h2&gt;

&lt;p&gt;A sitemap is only useful if it matches your site. WordPress and Shopify update theirs automatically. For custom or static sites, generate a new sitemap whenever you add, remove or rename pages, and upload it in place of the old one.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This guide was first published on &lt;a href="https://xmlsitemapgenerator.net/blog/how-to-create-an-xml-sitemap" rel="noopener noreferrer"&gt;XMLSitemapGenerator&lt;/a&gt;, where you'll also find free tools to create, check and find sitemaps.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
