Describe the process of creating a sitemap manually , including code examples .
Another option, not as quick, but likely allowing you to be more precise when creating your sitemap, is to do it manually. However, it’s important to have knowlge of XML, HTML, RSS, or other markup languages. Otherwise, the procure itself doesn’t have as many steps:
I open a text itor . Some options include Notepad
(for more basic projects), XML Copy itor (specifically for XML), Brackets (allows you to preview in real time), or applications like Rythm Software’s code itor .Start writing your sitemap code . You’ll ne to start (to comply with XML rules) with the XML declaration. On the next line, insert the <urlset> tag , and then start entering your sitemap entries.
Steps to create an XML Sitemap manually with a text itor
- Each sitemap entry (i.e., each page you enter) begins with the <url> tag and ends with the </url> tag . Between these tags will be othe brother cell phone list r tags that specify the characteristics of each page. A single-page sitemap would look like this:
Steps to create an XML Sitemap manually with a text itor
So you can read it, let’s see what each label means:
- <?xml version=”1.0″ encoding=”UTF-8″?> This is the XML “declaration.” It defines the standard and encoding us. This way, any XML parser can interpret the document.
- The <urlset> and </urlset> tags open and close the sitemap. They also refer to the protocol us.
- encapsulate the information of each URL that is enter.
- is us to enter the URL location. That is, its https address. The maximum accept character limit is 2,048.
- The <lastmod>YYYY-MM-DD</lastmod> tag indicates the last time the page was updat. It follows the year-month-day format.
- <changefreq>xxxx</changefreq> allows you to tell search engines how often the page content will be modifi. It accepts values such as “always,” “daily,” “never,” and others.
- Finally, <priority>0.5</priority> is us to set a URL’s priority over others. By default, it’s set to 0.5. However, you can increase it to 1 to indicate that a page should be given the highest priority, or lower it to 0.0 .
- Repeat this line of code as many times as necessary. Don’t forget to open and close each entry using <url> and </url> . When you html sitemap example – source: ‘re done entering them, close the sitemap with </urlset> .
- Save the file using the name
sitemap.xml
.
- Using an FTP client or file manager , upload the sitemap.xml to the root of your website.
Using plugins to generate sitemaps
There are some content management systems, such as Wix and Shopify , that automatically generate sitemaps. However, WordPress , the most popular CMS, does so through plugins. Two of the most recommend are Yoast SEO and Google XML Sitemaps .
While Google XML Sitemaps is gear solely toward creating sitemaps, WordPress Yoast SEO has more comprehensive features , allowing you to manage various aspects of an SEO strategy and making it a bit more convenient. Therefore, we’re aero leads going to use it to show you how to create a sitemap in WordPress Yoast SEO .
So, the steps to follow are:
- Install the plugin . This can be done from the Admin Panel.
- Activate it. Open the SEO option , within it, click on “General,” and then on “Features . ”
Steps to create an XML Sitemap with Yoast SEO
- Under “Features,” enable the “XML Sitemaps” option .
Steps to create an XML Sitemap with the Yoast SEO plugin
- To define the update frequency and priority of your sitemap pages , go to “Settings” and click “XML-Sitemap.” Then, set the parameters you prefer.
- The sitemap will be generat immiately and upload to the root of your website . Verify that everything is correct by searching for it at.