Create redirect URL
This page was printed on Jun 30, 2023. For the current version, visit https://help.shopify.com/en/manual/shopify-flow/reference/actions/create-redirect-url.
TheCreate redirect URLactioncreates a redirect URLthat transfers traffic from one web page to another.
Fields
TheCreate redirect URLaction contains the following fields.
Field | Description |
---|---|
Path | Required. The URL that customers areredirected away from. The URL used in this field must represent an existing URL in your store. |
Target | Required. The URL that customers areredirected to. The URL used in this field can be an existing URL in your store or an external destination. |
Overwrite existing redirect | When checked, a redirect is created even if there is already a redirect for the original URL that customers are being redirected away from. |
Triggers
TheCreate redirect URLaction can be used in any workflow.
Example
In this example workflow, a URL redirect is created when a product is deleted. The redirect sends visitors from the deleted product page to a page with more information on discontinued products.
This workflow uses the deleted product'stitle
property to generate the URL that customers are redirected away from. Note that if the product had a customized handle or URL prior to being deleted, this workflow might not work.
API details
To learn more, review theurlRedirectCreatemutation.