Redirect old URLs ​

A redirect sends visitors and search engines from an old URL to a new one. A 301 redirect tells search engines that the page moved for good, so they move its ranking to the new URL. Use redirects when you move a page, or when you move an existing website to ERPNext.

Add a redirect ​

  1. Open Website Settings, and go to the Redirects tab.
  2. In Route Redirects, add a row:
    • Source: the old route, without the domain and the leading slash, for example iphone.
    • Target: the new route or URL, for example products/iphone.
    • Redirect HTTP Status: 301 (the default) for a permanent move. Use 302 or 307 for a temporary move.
    • Forward Query Parameters: select it to keep the query string of the old URL.
  3. Save.

A visitor who opens https://example.com/iphone now goes to https://example.com/products/iphone.

TIP

Source is a regular expression. For example, blog/(.*) with the target news/\1 redirects every blog URL to the same path under news.