Sitemap Generator

Valid URLs—
Invalid lines—

How Sitemap Generator is calculated: One <url> entry per valid URL, with <lastmod> today, <changefreq> weekly, and <priority> 0.8

What is a sitemap generator?

A sitemap generator turns a list of page addresses into a sitemap.xml file: a machine-readable list of every page on a site, written in XML, that search engines read to find pages they might otherwise miss. You paste in one address per line, and the tool writes the file with each address wrapped in the tags a search engine expects, plus today's date, a change frequency, and a priority for each page.

Search engines find pages by following links, but links alone miss pages that are new, deep inside a site, or linked from nowhere. A sitemap hands the search engine the full list directly, so nothing depends on the crawler stumbling across it. It does not guarantee a page will be indexed, but it guarantees the page will be found and considered.

The file this tool writes must be uploaded to the site root as sitemap.xml, so it is reachable at yourdomain.com/sitemap.xml. The tool only writes the file; it cannot place it on your server for you. Once it is there, tell the search engine about it through its webmaster tools, or let the crawler find it on its own.

How a sitemap.xml works

A sitemap is an XML document that starts with a declaration line and a urlset element, then holds one url element per page. Each url element holds a loc element with the full address, a lastmod element with the date the page last changed, a changefreq element saying how often it changes, and a priority element saying how important it is relative to the other pages. The file this tool builds uses lastmod set to today, changefreq weekly, and priority 0.8 for every page.

The loc address must be complete, starting with https://, and must belong to the same site as the sitemap. A sitemap at example.com can only list example.com pages; it cannot list pages on another domain. An address without https:// is not a valid entry, and this tool counts such lines as invalid instead of writing them into the file, so a typo never corrupts the sitemap.

The lastmod date tells the search engine when the page last changed, so it can skip pages that have not changed and re-read the ones that have. Changefreq is a hint, not a promise: weekly means the page usually changes about once a week, and the crawler uses it to plan visits. Priority runs from 0.0 to 1.0 and is relative within the site; 0.8 says the page matters, without claiming it is the most important page on the site.

Which pages belong in a sitemap

List every page a visitor should be able to find: the home page, the main sections, the articles, the product pages, and the tool pages. The default here lists three: the home page, the about page, and the contact page. A real site lists all of them, and a large site can list up to 50,000 addresses in one sitemap file, or split them across several files with a sitemap index.

Do not list pages that should stay private: admin pages, login pages, test pages, and pages that redirect elsewhere. A sitemap is a public file, and anything listed in it is an invitation to visit. A page that returns an error, or that is blocked by robots.txt, should not be listed either, because it wastes the crawler's time and can look like a broken site. A sitemap should only list pages that actually work, so run a broken link checker over your site before you submit it.

Do not list the same page twice under different addresses. If a page is reachable at both example.com/page and example.com/page/, pick one address and use it everywhere, including the sitemap. Duplicate entries do not help, and they can split the ranking signals for one page across two addresses. If two addresses both work, fix the duplication with a redirect and list only the address that survives.

A worked example: a sitemap for three pages

Take the default list: https://example.com/, https://example.com/about, and https://example.com/contact. Paste those three lines in, and the tool reports 3 valid URLs and 0 invalid lines, and writes a sitemap with three url entries. Each entry holds the address, a lastmod date of today, a changefreq of weekly, and a priority of 0.8.

Now add a bad line, for example about-us with no https://, between the first and second addresses. The tool reports 2 valid URLs and 1 invalid line, and writes a sitemap with only the two good addresses. The bad line is left out of the file entirely, so the sitemap stays valid even when the input has a mistake. Fix the line to https://example.com/about-us and the count returns to 3 valid and 0 invalid.

The base URL field is a reminder of which site the sitemap belongs to, and it is not written into the file. The addresses themselves carry the site: every loc starts with the same domain, and that domain must match where the file is uploaded. If the addresses mix two domains, split them into two sitemaps, one per site. A URL encoder decoder can check that an address with special characters is written correctly before it goes into the list.

Why a sitemap helps search engines find pages

A new site has few links pointing at it, and its deeper pages may have no links at all from the home page. A crawler that only follows links can take weeks to find them, or never find them. A sitemap gives the crawler the whole list on the first visit, so every page is found on day one instead of week six.

A sitemap also helps when pages change. The lastmod date tells the crawler which pages changed since its last visit, so it can re-read the changed ones and skip the rest. Without a sitemap, the crawler must re-read pages to discover whether they changed, which wastes its time on a large site and delays the discovery of real updates.

The sitemap is not a ranking tool. It does not make a page rank higher, and a bad page listed in a sitemap still ranks badly. What it does is remove the excuse for a page not being found at all. For a small site with good internal links, the gain is modest. For a large site, a new site, or a site with pages buried deep, it is the difference between being found and being invisible.

Sitemap generator vs writing XML by hand

Writing a sitemap by hand is not hard for three pages, and many developers do it. The risk is the same as with any hand-written XML: a missing closing tag, an unescaped & in an address, a date in the wrong format, or a priority outside the 0.0 to 1.0 range. Any of those makes the whole file invalid, and a search engine that cannot parse the file ignores it entirely.

A generator removes those errors. It writes the declaration, the urlset, and every url element in the same shape, escapes nothing that needs escaping by keeping the addresses plain, and stamps today's date in the right format. It also counts the valid and invalid lines, so a typo is reported instead of silently written into the file.

Hand-writing still has a place: a large site usually generates its sitemap automatically from its database, with a different changefreq and priority per page type. But for a small site, a new site, or a one-off check, pasting the addresses into this tool and uploading the result is faster and safer. The same addresses can be checked with a domain name generator if the site itself still needs a name.

Common mistakes with sitemaps

The most common mistake is listing addresses that do not work: pages that return errors, pages that redirect, or pages that are blocked. A sitemap full of dead addresses tells the search engine the site is not maintained. Check every address before it goes in, and remove the ones that fail.

The second mistake is forgetting to upload the file, or uploading it to the wrong place. A sitemap that sits on a laptop does nothing; it must be at the site root as sitemap.xml, reachable at yourdomain.com/sitemap.xml. The third mistake is never updating it: a sitemap from a year ago lists pages that no longer exist and misses the new ones, so regenerate it whenever the site changes.

The fourth mistake is setting every page to priority 1.0 and changefreq daily. Priority is relative within the site, so if everything is 1.0, nothing is. Changefreq is a hint, and a page that says daily but changes yearly teaches the crawler to ignore the hint. Use 0.8 and weekly for ordinary pages, and save the higher values for the pages that really change. And the fifth mistake is using the sitemap as a substitute for links: pages still need links from other pages, because a page with no links and only a sitemap entry is still a weak page. A JSON formatter can tidy the structured data that often sits alongside a sitemap.

How to use this sitemap generator

First, paste the page addresses into the box, one per line, each starting with https://. The default lists three example pages, so you can see a result immediately. The results box shows how many lines are valid and how many are invalid, and the file below holds only the valid ones.

Check the invalid count. If it is not zero, find the line that is missing https:// or has a space in it, fix it, and watch the count drop to zero. The base URL field is a reminder of the site the sitemap belongs to; it is not written into the file.

Finally, copy the whole file and save it as sitemap.xml, then upload it to the root of your site, so it is reachable at yourdomain.com/sitemap.xml. Then tell the search engine about it in its webmaster tools, or wait for the crawler to find it. Re-check the file after uploading by opening the address in a browser: it should show the XML, not an error. Your addresses never leave your device: the whole file is built in your browser. A word counter can check the length of any page text you are about to add to the list.

Frequently Asked Questions

No. A sitemap guarantees the search engine finds the pages and considers them, but indexing is a separate decision based on the quality and usefulness of each page. A bad page listed in a sitemap still will not be indexed. What a sitemap does is remove the excuse for a page not being found at all, which matters most for new sites and deep pages.

Upload it to the root of your site, so it is reachable at yourdomain.com/sitemap.xml. The file must be named exactly sitemap.xml and sit at the top level, not inside a folder. After uploading, open the address in a browser to check it shows the XML, then submit the address in the search engine's webmaster tools.

Lastmod is the date the page last changed, and this tool sets it to today for every page. It tells the crawler which pages changed since its last visit, so it can re-read the changed ones and skip the rest. It is a hint, not a command, and the crawler may still re-read a page whose date has not changed.

One sitemap file can hold up to 50,000 URLs and must be no larger than 50 MB uncompressed. A larger site splits its pages across several sitemap files and lists them all in a sitemap index file. For a small site, a single file with every page in it is enough.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.