Create a 301 redirect (also known as a URL redirect) to send visitors from an old discontinued URL to a new active one. This is ideal for SEO when you unpublish or delete a page.
For example, when you unpublish or delete a product from your store, you can use a URL redirect to ensure your customers still find relevant content, like the related product's collection page.
To create a URL redirect:
- From your Shopify admin, open the Redirect Pro app.
- From the app navigation menu on the left, open the URL Redirects page.
- Click Create redirect.
- In the Redirect from field, enter the 404 broken link you want to redirect visitors away from (e.g. /old-page).
- In the Redirect to field, enter the new active URL that you want to redirect visitors to (e.g. /new-page).
- Click Save redirect. The redirect is now active.
Tip: To redirect to the homepage, enter a forward slash, /, in the 'Redirect to' field.
After creating a redirect you can test it to make sure it's working.
Relative URLs and full URLs:
What's the difference between a relative URL and a full URL?
A full URL (also called an absolute URL) is the complete link that you see in the browser when visiting a webpage on your store, like https://www.example.com/collection/shirts
.
A relative URL doesn't include the protocol (https://) or the domain (www.example.com). For example, the relative URL version of the full URL above would be /collection/shirts
.
It's important to note that a relative URL always starts with a forward slash, /.
When should I use a relative URL or a full URL?
The 'Redirect from' URL should always be a relative URL, as you can only create a redirect from a page on your store.
The 'Redirect to' URL can be a relative URL or a full URL. To redirect customers within your primary domain, use a relative URL as your 'Redirect to' URL. To redirect outside your primary domain (including to a subdomain), use a full URL.