« Back to Glossary Index
A relative URL does not use the full web address and only contains the location after the domain—or the path. The path includes everything after the domain, including the directory and slug. It assumes that the path is part of the same root domain.
The relative path starts with the forward slash and instructs the browser to stay within the current site.
An example of a relative URL is:
Relative URLs can be useful when working with multiple environments, such as moving from staging to production. Using relative URLs here would mean that the links will still work on the live site and do not need to be updated.
If an absolute URL were used here, you would likely still link to a non-indexable staging environment.
« Back to Glossary Index




