Set 301 redirects to maintain SEO ranking

Use 301 redirects to route traffic from an old URL to a new URL.

We’re transitioning to a new UI, and are in the process of updating our Webflow University content.

In this lesson, you’ll learn:

  1. When to set 301 redirects
  2. How to redirect a page
  3. How to redirect a folder
  4. How to use escape characters
  5. How to redirect an entire domain

When to set 301 redirects

Important: While Webflow currently doesn’t have a hard limit in place for total redirects, we recommend 1,000 maximum as best practice. Each redirect rule is uploaded to a site’s manifest.json file, which provides site information to visitors’ browsers. As the manifest file grows, there’s more data for browsers to download. For the best SEO and site performance, use wildcard redirects where possible, which minimizes the total number of redirect rules. 

301 redirects are useful for permanently routing traffic from an old path to a new URL — for example, when you:

  • Reorganize your URL structure (e.g., webflow.com/mysite to webflow.com)
  • Replace or redesign your site using different URLs (e.g., webflow.com/oldhomepage to webflow.com)
  • Move to a completely new domain (webflowiscool.com to webflow.com)
  • Secure alternative domains in case of site visitor typos (webflow.net, webflow.org, webflow.io to webflow.com)
A diagram of an old URL redirecting to a new URL. Two black squares with an arrow in between them. The words Old URL are on the left square and New URL are on the right square.

When an old URL is replaced with a new URL, your old URL may still be visible in search results, referenced in a blog post or a forum post, bookmarked, or printed on business cards or other materials. Anyone who visits the old URL will be led to a 404 page — but if you set up a 301 redirect, site visitors visiting the old URL will be redirected to the specified new URL.

Google will eventually index your new site structure and old URLs will get updated. However, 301 redirects are a best practice, especially if you want to maintain ranking power from the old URL.

There are other types of redirects — such as 302 redirects, which indicate a temporary relocation — but 301 redirects are best used if you need to permanently route incoming traffic to a new URL.

How to redirect a page

You can permanently redirect old pages or entire folders of pages to new locations in your Webflow site. To set a 301 redirect:

  1. Go to Site settings > Publishing > 301 redirects
  2. Enter the old URL in the Old path field (e.g., /old-url)
  3. Enter the new URL in the Redirect to path field (e.g., /entirely/new-url/structure)
  4. Click Add redirect path
  5. Publish your site

Now, you can test the redirect by entering the old URL in a new browser tab. It should redirect to the new URL. For more information about writing redirect URLs, check out the section on escape characters

How to redirect a folder

To redirect the contents of a folder — whether you’re redirecting to a single page or multiple pages — you’ll need to use capture groups.

To get started with a basic folder redirect to multiple pages:

  1. Go to Site settings > Publishing tab > 301 redirects
  2. Enter a URL with a capture group “(.)” in the old URL structure in the Old path field (e.g., /oldfolder/(.))
  3. Enter a URL with a target path “%1 in the new URL structure in the Redirect to path field (e.g., /entirely/new-url/structure/%1)

You can add multiple capture groups to create more complex redirect rules.

Wildcard redirect examples

Let’s say you want to redirect multiple pages in a folder to a single URL — for example, to point domain.com/collections/women, domain.com/collections/men, and domain.com/collections/children all to domain.com/collections. Assuming domain.com is the domain connected to your Webflow site, you’d write this redirect as follows: 

  • Old path: /collections/(.*)
  • Redirect to page: /collections

Or, let’s say you want to redirect all pages with a URL structure like /domain.com?category=food&post=pie to /blog/food/pie — i.e., redirect multiple pages to multiple URLs. 

You might have categories like “music,” “travel,” and “food,” and posts like “beyonce,” “hawaii,” and “pie.” These are your variables. In the URL above, “food” and “pie” are the variables. To make these variable changes, you’ll need to call out these variables with capture groups, which are written as “(.*)”. For example, you’d need to write this redirect as follows:

  • Old path: %?category%=(.*)%&post%=(.*)
  • Redirect to page: /blog/%1/%2

In the example above, “%1” refers to the first capture group, and “%2” refers to the second. With this wildcard redirect in place:

  • domain.com?category=music&post=beyonce will redirect to /blog/music/beyonce
  • domain.com?category=travel&post=hawaii will redirect to /blog/travel/hawaii
  • domain.com?category=food&post=pie will redirect to /blog/food/pie

How to use escape characters

For URLs with wildcards and single paths, you’ll need to escape the following characters by using the “%” symbol before the character:

  • %
  • -
  • &
  • *
  • (
  • )
  • =
  • _
  • +
  • ?

For example, /old-folder/(.) needs to be written as /old%-folder/(.) in order to function as a redirect.

Let’s say you want to redirect mysite.com?category=food to mysite.com/blog/food. You’ll need to write your redirect as follows:

  • Old path: %?category%=food
  • Redirect to path: blog/food

In this case, the “%” signs before the “?” and “=” are required to make the redirect work properly.

Note: You only need to escape characters in the old path — you don’t have to escape characters in the new redirect path.

How to redirect an entire domain

To redirect one domain to another:

  1. Connect both old and new domains to your site
  2. Set the new domain as the default
  3. Publish your site

Table of contents

Continue learning

Hmm…we couldn’t find any results for “search query”. Try a different search term or check out our community forum.

Search the forumReset the filter
Load more

Filter

Reset
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Topics
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Back to top