Best practice for URLs

Learn about the differences between relative paths and absolute URLs

Kyle Weiskopf avatar
Written by Kyle Weiskopf
Updated over a week ago

What is the difference between a relative path and an absolute URL?

The main difference between a relative path and an absolute URL is the beginning of the URL. Relative paths start with a forward slash (/), whereas absolute URLs start with https:// or http://

When to use a Relative path

Use a relative path if you want to redirect customers to a page within your Shopify store.

Here are some examples of relative paths:

  • /account  

  • /pages/thank-you 

  • /cart 

When to use an Absolute URL

Use an absolute URL if you want to redirect customers to a page on an external website, outside of your Shopify store.

Here are some examples of absolute URLs: 

  • https://www.instagram.com/reef_stack/ 

  • http://customerfields.com/features 

  • https://heliumdev.com/apps 

Did this answer your question?