Using the Sitemap Validator
This page checks sitemap XML that you paste. The sample is a urlset with one loc, https://example.com/. The headline is 1 URL. A line labeled Valid loc values shows 1, and a line labeled Rejected loc values shows 0. The result sentence reads 1 URL passed. 0 loc values did not start with http:// or https://. The page reads the pasted text. It does not fetch the addresses, and it does not open the URLs.
The root element must be urlset. A document whose root has another name is rejected with The root element must be urlset. That same message is used when the text does not parse as XML. Each loc is read from the document. After trimming, the loc must start with http:// or https://. The sample loc starts with https://, so it counts as valid. A loc that does not start with either scheme counts as rejected. If at least one loc is valid, the page reports both counts. If none are valid, the page rejects the document with Add at least one loc that starts with http:// or https://.
The pasted text must contain from 1 to 20000 characters, and it must not be empty once spaces are set aside. A blank field, a field of only spaces, and a string longer than 20000 characters are rejected with Enter from 1 to 20000 characters. A document type is rejected before the root is judged, with Remove the document type before checking. The page does not strip a document type and continue.
The same XML returns the same counts on every run. The page does not download a host, does not follow a loc, and does not rewrite the XML into a new file. The check for this form is the sample urlset: one https loc, the headline 1 URL, and a rejected count of 0.
A loc is counted wherever it sits inside the urlset, including when several url elements each carry one loc. The valid tally and the rejected tally are independent. One https loc keeps the check alive even if a neighbor has no scheme. The neighbor raises the rejected count and leaves the valid count in place. The headline follows the valid count, so two https locs become 2 URLs. The page trims each loc before the scheme test, so spaces around https://example.com/ still pass. A loc that puts the scheme after other text does not pass, because the test looks at the start. Write the scheme at the beginning of every loc you want counted. The sample stays the simple case: one loc, one URL, and a rejected count of 0. Paste that short urlset first when you want to see the lines before you bring in a longer file.
What the URL Count Shows
The headline is the count of valid loc values, written as 1 URL when the count is one and as a plural count otherwise. For the sample the headline is 1 URL. The valid line repeats 1. The rejected line is 0, because the only loc starts with https://. The sentence puts both facts together: 1 URL passed. 0 loc values did not start with http:// or https://. A note that stores only 1 URL should also keep the XML, because the count is about that paste and not about a site the page visited.
The page does not fetch the addresses. A valid loc is a string that starts with http:// or https:// after trimming. The sample string is https://example.com/. The page does not ask the host whether that path exists. A rejected loc is still reported when some other loc passed. A paste with no passing loc does not become a headline of 0 URL. It is rejected with Add at least one loc that starts with http:// or https://.
How the Sample Urlset Counts as 1 URL
Paste a urlset whose only loc is https://example.com/. The root name is urlset, so the root check passes. The loc is trimmed and compared with the two schemes. It starts with https://, so the valid count is 1 and the rejected count is 0. The headline is 1 URL. A second paste of the same XML returns the same counts. There is no network step between the paste and the count. The page does not open https://example.com/ to confirm the count.
A robots file built from fields is a different result. The Robots TXT Generator builds a robots.txt file from a user agent, a disallow path, an optional allow path, and an optional sitemap URL. The page does not upload the file. Use it when you want that file text from those fields. Use this page when you already have sitemap XML to check, and the sample check is one https loc counted as 1 URL.
The Root and the Scheme
The root must be urlset. The comparison ignores letter case on the element name, and it uses the local name, so a prefixed urlset can still be the root. A root that is not urlset is rejected with The root element must be urlset. Text that is not XML at all uses that same message, because the document never produced a urlset root. A document type is a separate, earlier rejection: Remove the document type before checking. Removing it is your edit. The page does not delete it for you.
Each loc is judged only by its opening. http:// and https:// both pass. A loc of https://example.com/ passes. A loc that is only example.com does not, because it does not start with either scheme. Spaces around the loc are trimmed before that test. The page does not add https:// to a loc that omitted it. If one loc passes and another does not, the valid count and the rejected count are both reported, and the headline follows the valid count. The rejected loc stays in the rejected tally. It does not remove the valid one.
One Valid Loc and the Rejections Beside It
Paste <urlset><url><loc>https://example.com/</loc></url></urlset>. The headline is 1 URL, the valid line is 1, and the rejected line is 0. The sentence says 1 URL passed and that 0 loc values missed the scheme. Add a second loc of http://example.com/ inside the same urlset and the valid count becomes 2, because http:// passes as well as https://. Replace the only loc with example.com, with no scheme, and the page rejects the paste with Add at least one loc that starts with http:// or https://. Put a document type in the text and confirm Remove the document type before checking. Change the root to another element name and confirm The root element must be urlset.
Language tags on their own lines are a different check. The Hreflang Validator checks hreflang tags you type, one per line. en is valid. english is not. The page does not fetch a site. Use it when the text is a list of language tags. Use this page when the text is sitemap XML, and the sample result is 1 URL for a urlset whose loc is https://example.com/.
The 20000 Character Paste
The XML must contain from 1 to 20000 characters, and it must not be empty once spaces are set aside. The sample urlset is far inside that span, and the result is 1 URL. A string of 20000 characters is accepted when it also passes the root, the document-type check, and the loc check. A string of 20001 characters is rejected with Enter from 1 to 20000 characters. An empty field and a field of only spaces use that same message. The page does not keep the first 20000 characters of a longer paste.
A document type is rejected even when the rest of the text would have been a urlset under 20000 characters. The message is Remove the document type before checking. A parsed document with the wrong root, and a string that does not parse, share The root element must be urlset. A urlset that parses and contains no loc starting with http:// or https:// is rejected with Add at least one loc that starts with http:// or https://. Those are three different failures. A passing sample avoids all three and reports 1 URL with 0 rejected loc values. The page does not fetch any loc while it applies these rules.
Mistakes With Fetching, Schemes, and the Root
The usual miss is to treat 1 URL as proof that https://example.com/ was opened. The page does not fetch the addresses and does not open the URLs. The count means the loc string started with https://. Another miss is to omit the scheme and expect the page to add https://. example.com does not pass. A third miss is to use a root other than urlset and expect the locs inside it to be counted. The root check fails first. A fourth miss is to leave a document type in the paste and expect the page to ignore it. The document type is rejected. A fifth miss is to paste more than 20000 characters and expect a partial check. The extra characters cause a rejection, and no URL count is shown.
Tracking parameters on an address are a different edit. The URL Cleaner removes common tracking parameters from a URL and keeps the rest. A link with utm_source and id keeps id. The page does not open the link. Use it when you want those parameters dropped from one address. Use this page when you want a count of loc values in pasted sitemap XML.
Reading Both Loc Counts
Read the headline, then the valid line, then the rejected line. For the sample, the headline is 1 URL, the valid line is 1, and the rejected line is 0. Those three agree. If you add a loc that does not start with http:// or https:// and you still have the sample loc, the valid line stays at least 1 and the rejected line rises. Write the rejected loc down beside that count so you can see which string failed the scheme. If the page shows a rejection message instead of the two lines, the paste did not reach a count. Match the message to the cause: length, document type, root, or no valid loc.
The page does not fetch, so a note that says the host responded is about some other step. This page's note for the sample is the XML, the headline 1 URL, and 0 rejected loc values. Keep the scheme in the loc when you edit. https://example.com/ passes. example.com does not. Keep the root as urlset. Keep the document type out. Stay at or under 20000 characters. Then the two lines are the result to store.
Running the Sample Urlset Again
Paste the sample urlset and confirm the headline is 1 URL, the valid line is 1, and the rejected line is 0. Confirm the sentence says 1 URL passed and that 0 loc values missed the scheme. Paste the same XML again and confirm the counts match. Clear the field and confirm Enter from 1 to 20000 characters. Add a document type and confirm Remove the document type before checking. Change the root and confirm The root element must be urlset. Remove every valid loc and confirm Add at least one loc that starts with http:// or https://. The page does not open https://example.com/ on any of these runs.
Pretty-printed markup is a different pass. The XML Formatter indents an XML document. <a><b>Hi</b></a> is formatted with each element on its own line. The page does not fetch a file and does not accept a document type. Use it when you want the elements broken onto lines. Use this page when you want the loc counts for a urlset, with the sample counted as 1 URL.
Where the 1 URL Count Belongs
The count belongs next to the XML that produced it. This page stops at the check. A urlset with loc https://example.com/ is 1 URL, with 0 rejected loc values. The root must be urlset. Each counted loc must start with http:// or https://. The paste must be from 1 to 20000 characters. A document type is rejected. The page does not fetch the addresses and does not open the URLs. If a host later fails to serve a loc, that failure is outside this count.
Checking the Sample Before a Larger Paste
Start with the one-loc urlset. The headline should be 1 URL and the rejected line should be 0. Then add a loc that is only a host name and confirm it does not pass the scheme test. Then remove the scheme from the only loc and confirm the page asks for at least one loc that starts with http:// or https://. Then put the document type back and confirm that message is different from the root message. A blank field should be rejected with Enter from 1 to 20000 characters. If the headline is 1 URL and the sentence mentions a rejected loc, the paste is not the sample.
A single JSON-LD object is a different builder. The Schema Markup Generator builds one JSON-LD object from a type, a name, and a description. The page does not publish the markup or claim that a search engine will use it. Use it when you want that object from those three fields. Use this page when you want to count loc values in sitemap XML you paste, with the sample urlset reported as 1 URL.