A URL is the address you see in the browser bar. Like a postal address, it says exactly where a resource is located and how to reach it.
Parts of a URL#
For example:
https://example.com/blog/post?id=5#commentshttpsprotocol: the secure way of communicating with the serverexample.comdomain: the name of the site/blog/postpath: the page or file on the site?id=5parameter: extra information the page receives#commentsfragment: a jump to a specific part of the page
Why it matters#
- A readable, short address is easier for users to understand and also for search engines
- In WordPress the path part is called the "permalink", and it is better for it to use the title rather than a number
- Changing a page's URL without a redirect leads to a 404 error and lost rankings
A note on non-English characters#
An address can contain non-Latin letters. Browsers display them nicely, but they are actually percent-encoded, so a copied link can look long and unreadable in messaging apps. For many sites a short Latin address is the safer choice, though non-Latin addresses are fully valid.
Difference from a domain#
A domain is only one part of a URL. A URL is the full address of a specific page, whereas the domain is the general name of the site.