The root URL is where a website's addresses begin: the protocol and host name followed by a single slash, with no path, query or fragment after it. Every other page sits below it in the URL's path.
"Root URL" is an everyday term, not one from a standard. The URL standard (RFC 3986) splits an address into parts, and the root URL is what you get when the path is just /:
| Part | In https://www.example.com/blog/post?id=7 |
|---|---|
| Protocol (scheme) | https |
| Host | www.example.com |
| Path | /blog/post |
| Query | id=7 |
| Root URL | https://www.example.com/ |
People sometimes say "root URL" when they mean the homepage, and usually that's the same thing: the homepage is the page a server returns for the root. A few related terms get mixed in:
- Root domain is the registered domain name without subdomains, such as
example.com.www.example.comandshop.example.comare subdomains of it, and each has its own root URL. - Root directory is the top folder on the server whose files appear right after the first slash. A file
logo.pngin it is served athttps://example.com/logo.png.
With or without the trailing slash: the same URL
https://example.com and https://example.com/ are the same address. The HTTP standard says an empty path is equivalent to / (RFC 9110), and Google says the two forms of a root URL are equivalent and can't be redirected to each other. Over HTTP/1.1, the request for either one asks the server for /.
That's only true at the root. For deeper pages, /blog and /blog/ are different URLs that can show different content. See trailing slashes.
Two other differences don't matter either: the host is case-insensitive (Example.com is example.com), and the default port (443 for HTTPS) is left out.
The root versions that do count as different
These addresses can all show your homepage, but to a search engine they're separate URLs:
http://example.com/andhttps://example.com/https://example.com/andhttps://www.example.com/https://example.com/andhttps://example.com/index.html
If all of them return the page, you have duplicate content at your most important address. Google groups duplicates and picks one to show, but it may not pick the one you want, and split versions make it harder to track how the page performs.
To keep one version:
- Choose one. Use HTTPS, then decide with or without
www, and keep that choice everywhere. - Redirect the rest. Send every other version to it with a permanent server-side redirect (301 or 308). Google recommends these whenever possible.
- Link to it consistently. Use the chosen form in your menus, sitemap, canonical tags and profiles elsewhere.
To check, type each version into a browser and see where you end up. All should land on the same address in one step, without chains. More on choosing a preferred URL in URL canonicalization.
Why the root matters for setup
A few site-wide files and tools work from the root of a host:
- robots.txt must sit at the root, at
https://example.com/robots.txt. A file in a subfolder is ignored. See robots.txt. - Sitemaps can list only URLs at or below their own location. A sitemap at the root, such as
https://example.com/sitemap.xml, can include any URL on that host; one at/blog/sitemap.xmlcan include only/blog/URLs. - Google Search Console lets you add a site as a URL-prefix property for one root URL, such as
https://www.example.com/, or as a Domain property. A Domain property covers every subdomain and both protocols, and you verify it with a DNS record. If you're unsure which root versions get traffic, a Domain property shows them all.