A relative link is a hyperlink that includes only the path to a page, such as /services/seo-services/, rather than the full address with protocol and domain. The browser fills in the missing parts based on the current page.
The alternative is an Absolute Link, such as https://2marketing.com/services/seo-services/.
Advantages of relative links:
- Shorter code.
- Easier to move a site between staging and live domains without breaking links.
Risks:
- If a site can be reached at several versions, such as HTTP and HTTPS, or with and without www, relative links keep visitors and crawlers on whichever version they entered, which can create Duplicate Content signals.
- Content copied or scraped to another domain will link to that domain instead of yours.
- Path-relative links without a leading slash, such as services/seo/, can break depending on the folder of the current page.
Best practice:
- Redirect all versions of your site to one canonical domain, so relative links always resolve correctly.
- Use root-relative links (starting with /) rather than path-relative ones.
- Use absolute URLs for canonical tags, Hreflang Tag, sitemaps and social tags.
Link structure is reviewed in our technical SEO audits.
