Skip to content
BeoHosting
BeoHosting
SEO

How to Create a Sitemap and Submit It to Google

BeoHosting Team··7 min read read
How to Create a Sitemap and Submit It to Google

An XML sitemap is one of the most important technical technical SEO elements on your site. It is a file that tells search engines (Google, Bing, etc.) which pages exist on your site, how important they are, and how often they change. In this guide we show you how to create a sitemap and submit it to Google.

What is an XML sitemap?

An XML sitemap is a structured XML file that lists all important URLs on your site. Think of it as a map of your site that you hand to Google so it can more easily find and index all your pages. Without a sitemap, Google relies on following links to discover pages, which can be slow and unreliable - especially for new sites or sites with poor internal linking.

A typical sitemap looks like this:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourcompany.com/</loc>
<lastmod>2025-12-10</lastmod>
<priority>1.0</priority>
</url>
</urlset>

Why is a sitemap important?

Faster indexing: When you publish a new page or post, Google can find it faster if it is in the sitemap. Instead of waiting for Google to discover the new page through links, the sitemap directly tells it that the new page exists.

Complete indexing: Some sites have pages that are poorly linked. Quality hosting with high uptime also matters for indexing from the rest of the site. Without a sitemap, Google may never find these "orphan" pages. A sitemap ensures every important page is known to Google.

Priority and frequency: The sitemap lets you tell Google which pages are most important (priority) and how often they change (changefreq). Google uses this as a signal, though it does not guarantee it will honor your preferences.

Diagnostics: When you submit a sitemap to Google's webmaster tool, you can see how many pages Google indexed out of the total in the sitemap. A large gap is a signal something is wrong.

Creating a sitemap in WordPress

If you use WordPress for content management, the easiest way to create a sitemap is through an SEO plugin. The two most popular are Yoast SEO and Rank Math.

Yoast SEO

Yoast SEO automatically creates a sitemap on installation. Access it at:

https://yourcompany.com/sitemap_index.xml

Yoast creates a sitemap index that links to individual sitemaps for posts, pages, categories, and tags. To verify the sitemap is active, go to Yoast SEO > General > Features and make sure "XML sitemaps" is enabled.

You can control which content types are included in the sitemap: Yoast SEO > Search Appearance. For each type (Posts, Pages, Categories, etc.) you can choose whether it appears in the sitemap or not.

Rank Math

Rank Math also creates a sitemap automatically. Access it at:

https://yourcompany.com/sitemap_index.xml

In Rank Math settings (Rank Math > Sitemap Settings) you get detailed control over the sitemap. You can enable/disable individual content types, set the maximum number of URLs per sitemap file, and include images in the sitemap (recommended).

Rank Math also supports video sitemap and news sitemap for sites with video content or news.

Creating a sitemap manually

If you do not use WordPress or want full control, you can create a sitemap manually. Create a file named sitemap.xml in the root directory of your site with the following structure:

Each URL should have a <loc> tag with the full URL. Optionally you can add <lastmod> (date of last change), <changefreq> (how often it changes: always, hourly, daily, weekly, monthly, yearly, never), and <priority> (priority from 0.0 to 1.0).

Rules for a manual sitemap:

Use absolute URLs with protocol (https://yourcompany.com/page, not /page). Maximum URLs per sitemap file is 50,000. Maximum file size is 50MB (uncompressed). If you have more than 50,000 URLs, use a sitemap index that links to multiple sitemap files.

Do not include pages that return a 404 error, pages with a noindex meta tag, or duplicate pages. The sitemap should only contain canonical URLs you want Google to index.

Online sitemap generators

If you do not use a CMS with a sitemap plugin and do not want to write XML by hand, online tools can generate a sitemap for you. Popular ones are XML-Sitemaps.com and Screaming Frog SEO Spider. These tools crawl your site and automatically create a sitemap file that you upload to the server.

Screaming Frog is especially useful because it is a desktop application that analyzes your site in depth and can generate multiple sitemap types. The free version crawls up to 500 URLs.

Submitting the sitemap to Google Search Console

Creating the sitemap is only the first step. The second is to submit it to Google through Google Search Console. Here is how:

Step 1: Open Google Search Console (search.google.com/search-console). If you do not have an account, create one and verify ownership of your domain (DNS verification is the easiest - add a TXT record).

Step 2: In the left menu, click "Sitemaps".

Step 3: In the "Add a new sitemap" field, enter the URL of your sitemap (e.g. sitemap_index.xml or sitemap.xml). Click "Submit".

Step 4: Google will start processing your sitemap. Status will change to "Success" when the sitemap is read successfully. This can take from a few minutes to a few days.

After submitting, Google Search Console shows statistics: how many URLs are in the sitemap, how many are indexed, and whether there are errors. Check these statistics regularly.

Sitemap for Bing

Do not forget Bing. Although Google is the dominant search engine, Bing has around 3-4% of global search market share (more in the US). Submit the sitemap to Bing Webmaster Tools at www.bing.com/webmasters as well. The process is similar to Google.

robots.txt and sitemap

Add a sitemap reference to your robots.txt file. Add this line at the end of robots.txt:

Sitemap: https://yourcompany.com/sitemap_index.xml

This helps search engines find your sitemap automatically even if you have not manually submitted it.

Most common sitemap mistakes

Including noindex pages: If a page has a noindex meta tag, it should not be in the sitemap. This sends contradictory signals to Google.

Stale sitemap: The sitemap should auto-update when you add or remove content. A static sitemap that never updates loses value over time.

Incorrect URLs: URLs in the sitemap must exactly match the real URLs on the site, including protocol (http vs https) and trailing slash.

Oversized sitemap: If you have a huge site, split the sitemap into multiple files using a sitemap index. Google recommends each sitemap file be no larger than 50MB and contain no more than 50,000 URLs.

Conclusion

An XML sitemap is a simple but powerful SEO tool. It helps Google index your site faster and more completely, which is especially important for new sites, large sites, or sites with pages that do not have many internal links. If you use WordPress, an SEO plugin will handle everything automatically. Submit the sitemap to Google Search Console, add a reference in robots.txt, and regularly monitor indexing statistics. That is all you need to do to ensure Google knows about every important page on your site.

BeoHosting Team

10+ years of experience — Web hosting and infrastructure specialists

  • Web Hosting
  • WordPress Hosting
  • VPS
  • Dedicated Serveri
  • Domeni
  • SSL
  • cPanel
  • LiteSpeed
  • Linux administracija
  • DNS

Last updated: