The tool rejected some lines in my list, such as /about and example.com/shop. How do I fix them?
Give each rejected line what it is missing to become a full URL: https://, then the domain, then the path. The sitemap protocol only accepts complete addresses, because a search engine reads the file apart from your site. The tool lists every rejected line with its number and reason, so you fix it and generate the file again.
Example: five lines, four reasons
We pasted this list, the way it might come from quick notes or scattered copying:
/about
example.com/shop
https://example.com/ok
ftp://example.com/x
https://example.com/my page
The file came out with a single valid URL, line three, and a 'Rejected lines (4)' list gave these reasons:
- Line 1, /about: not a full URL; it is a path with no domain or scheme.
- Line 2, example.com/shop: same reason. It looks complete, but without https:// in front the tool does not treat it as a URL.
- Line 4, ftp://example.com/x: scheme not accepted; only http and https are allowed.
- Line 5, https://example.com/my page: not a valid URL, because it contains a space.
Fixing each kind
- A path starting with a slash, like /about: put https:// and your domain in front, giving https://example.com/about.
- A domain with no scheme, like example.com/shop: just add https:// at the start.
- Another scheme, like ftp: that is not a web page people visit, so delete the line or replace it with the real page URL.
- A link with a space: open the page in your browser and copy the address bar, where the space appears as %20. Or encode the link in the URL encoder/decoder.
In the first case, watch the host: if your site opens on www, include it, so one file does not mix two hosts.
After fixing
The XML sitemap generator updates as you type, so correct the lines right in the URL box and watch 'Rejected lines' drop to zero. If you uploaded a large file (over two thousand lines), the box shows its start read-only, so fix the original file and upload it again. If no valid URL is left at all, no file is made and a message asks you to fix the listed lines.
What this check cannot catch
The tool checks the form of each URL only. A well-formed link to a page you deleted last month passes without complaint, because the tool never visits your site or opens any link. Before uploading the file, open a sample of the links yourself, especially the older ones.
Common questions
Are Arabic URLs rejected?
No. Arabic characters are accepted and written into the file in encoded form. A space is what gets rejected.
Is a plain http:// link accepted?
Yes, but use the scheme your site really opens on, and do not mix the two in one file.
How many rejected lines does the tool show?
It lists the first hundred and states how many more there are.
