Relative URL

A relative URL is a link that points to another page on the same website using a path relative to the current page, rather than the full domain. It helps keep internal links consistent and flexible.

Relative URL

A relative URL is a type of web address that points to a page, file, or resource within the same website by using a path relative to the current page’s location, rather than specifying the full domain.

For example, instead of writing https://example.com/blog/post, a relative URL would simply be /blog/post.

Relative URLs are commonly used for internal linking, and they help keep your website structure clean, consistent, and easier to manage, especially during development or when migrating domains.

Why relative URLs matter

Relative URLs are useful for:

  • Internal site structure — easier to maintain and update
  • Domain flexibility — useful if moving from staging to live environments
  • Consistent linking — reduces hardcoded absolute URLs that can break
  • Avoiding protocol issues — no need to specify HTTP or HTTPS

However, for SEO, absolute URLs are often preferred for canonical tags, sitemaps, and structured data to ensure clarity for search engines.

Relative vs. absolute URLs

TypeExampleDescription
Relative/about-usAssumes the same domain as the current page
Absolutehttps://example.com/about-usIncludes full domain and protocol

Relative URLs are interpreted based on the current page’s URL, while absolute URLs always point to the same location no matter where they’re used.

<!-- Relative URL -->
<a href="/contact">Contact Us</a>
<!-- Absolute URL -->
<a href="https://example.com/contact">Contact Us</a>

Both links point to the same page, but the first one is relative — it assumes the domain is already known.

Best practices for using relative URLs

  • Use relative URLs for internal links during development or on smaller sites
  • Use absolute URLs in canonical tags, sitemaps, and when referencing your content externally
  • Ensure relative URLs are correctly structured to avoid broken links
  • Be consistent — don’t mix and match too many URL styles
  • Use tools like Screaming Frog or Sitebulb to audit your internal linking structure

In summary, a relative URL points to another page on the same website using a simplified path. It’s great for internal navigation and development flexibility, but should be used thoughtfully alongside absolute URLs to support SEO clarity and consistency.

Free SEO Tools

Simple, powerful tools to help you improve your website's SEO performance

SERP Checker

Enter your website and keyword to see where you rank in Google search results.

Try it free →

SEO Checker

Analyze your website's SEO and get actionable tips to improve.

Try it free →

Keyword Rankings

Discover all the keywords your website is already ranking for on Google.

Try it free →