Note: While our most popular guides have been translated into Spanish, some guides are only available in English.
URL redirects

You can create URL redirects to forward visitors away from pages that don't exist to active pages. This can be for permanent changes (301 redirects) or temporary changes (302 redirects).

This guide explains how to create redirects in the URL Mappings panel.

Watch a video

301 vs. 302 redirects

301 redirects are meant for permanent changes and 302 redirects are meant for temporary changes. 301 redirects are more common than 302 redirects.

301 redirects

301 redirects direct visitors to a different URL when they click a link to a nonexistent page. They tell search engines that a page has moved, and search engines transfer the old page's rank to the new page.

To use a 301 redirect, the original URL can no longer exist, and the new one must exist. Ensure the old URL doesn't exist by deleting the old page, disabling it, or changing its URL.

You should use 301 redirects if:

  • You changed a page's URL (in its page settings).
  • You deleted a page from your site and want to redirect to your homepage.
  • You imported content and the URLs changed. In this scenario, it's usually because your previous site didn't have a page slug for the blog page, just posts.
  • You're redirecting to another domain.

302 redirects

302 redirects direct visitors to a different URL when someone clicks a link to an old page. They tell search engines that a page has temporarily moved. Search engines don't give the new page the same rank as the old one. Since the redirect is temporary, it lets search engines know that the original page should keep its rankings, as it will be back online.

302 redirects are commonly used when stores or restaurants change their products and offerings seasonally. You should use 302 redirects if:

  • You need to temporarily take down a page to update it for your new offerings.
  • You want to temporarily replace a page with another page as you cycle through different offerings through the year.

Before you begin

  • URL redirects only apply to the built-in and custom domains connected to your Squarespace site. If your domain is hosted by another provider, connect it to your site before using URL redirects.
  • Ensure you keep the same capitalization as your URLs. If your URLs are all lowercase, then your redirects should also be all lowercase.
  • Most URL redirects can't use ?, &, or # symbols, as these interfere with the redirect process. This may prevent you from redirecting to anchor links, category links, and some Index Pages. One exception is RSS feed URLs, which can contain the ? symbol.
  • Ensure that your URL redirects don't use any reserved URL slugs.
  • The URL mappings field has a limit of 400 KB, which is usually around 2500 redirect lines. We recommend deleting inactive redirects to keep this area manageable.
  • Your site activates redirects from top to bottom, so higher redirects will take priority over conflicting redirects below them. If you have specific redirects (for example, an individual blog post), place them above broader redirects that may conflict (for example, the main Blog Page).
  • Redirects only work if the page you're redirecting from has been deleted or disabled.

Create redirects

To set up URL redirects:

  1. In the Home Menu, click Settings, then click Advanced.
  2. Click URL Mappings.
  3. Click into the text box and add your redirects. Ensure the formatting is correct.
  4. Click Save.

Format redirects

To create a URL redirect, follow the formatting steps below.

Redirect one page

To create a URL redirect, you need four elements:

  1. The old URL for the page that doesn't exist.
  2. The "arrow", which is a dash immediately followed by a greater than sign (->).
  3. The new URL for the page you want to redirect to.
  4. The redirect type (301 or 302).

The URL mapping looks like this:

/old-url -> /new-url 301

Redirect multiple blog posts, events, or products

These collection pages usually include multiple items:

  • Blog Pages
  • Products Pages
  • Events Pages

Each item has its own URL that includes the page's slug followed by the item's slug (for example, /blog/example-post).

If you change a page's URL slug in page settings, every item in the page will have a new URL. You'll probably want to direct visitors to the right place even if they use an outdated URL to open an item. Instead of adding separate redirect lines for every post, you can save time by adding one line that redirects all item URLs.

To redirect all items in a collection, use the [name] variable when creating the redirect.

Example: Your old Blog Page's URL was /blog and you changed it to /posts. Ensure visitors can still view "Example Post" through http://www.yourdomain.com/blog/example-post by entering [name] in the redirect, like this:

/blog/[name] -> /posts/[name] 301

This option works best for changes to collection page URLs on Squarespace. For setting up a bulk redirect after importing blog posts from a third-party, see our imported content example.

RSS feed URLs

The best way to redirect an RSS feed for podcasts is in page settings.

If you're redirecting an RSS feed manually, follow the steps above, but remove the ? and all characters after it from the original URL. If you leave the original URL as is, visitors will see a 404 error.

For example, don't use this redirect structure for RSS feeds:

/old-url?format=rss -> /new?format=rss 301

Use this redirect structure:

/old-url -> /new-url?format=rss 301

After you've set up your redirect, you can visit the URL with the format /old-url?format=rss directly, and the redirect will work correctly.

Examples and common scenarios

This section reviews some common situations requiring URL redirects and explains how to set up redirects for them.

301 Examples

Changed page URLs

Use a 301 redirect when you permanently change the URL of a page. For example, if you have a page with the URL https://mybusiness.com/about and you want to change it to https://mybusiness.com/team, follow these steps:

  1. In the page settings, change the URL Slug.
  2. In URL Mappings, create the redirect from /about to /team.

The redirect looks like this:

/about -> /team 301

Deleted pages

Use a 301 redirect when you delete pages from your site and want to prevent visitors from seeing a 404 error page. For example, if you delete a page with the URL https://mybusiness.com/history, you can redirect visitors from that page to your homepage. Since the homepage doesn’t have a visible URL slug, you can use a blank slug in your redirect.

The redirect looks like this:

/history -> / 301
Note: To prevent a deleted page from showing in Google search results, index (or re-index) your site using Google Search Console.

Imported content

Use a 301 redirect when you import content from a different host.

Example: your blog was hosted on a site with the URL structure https://mybusiness.com/post-title, and on Squarespace the same post has the URL structure https://mybusiness.com/blog/post-title.

Because the post titles are the same but the URL structure is different, you can create a single redirect rule for all blog posts, like this:

/[name] -> /blog/[name] 301
Note: Check with your previous host to ensure you have the correct URL structure for the first part of the redirect. The structure may vary, but so long you don’t change any post titles after importing, a redirect like the one above will cover all imported blog posts.

Moved collection items

Use a 301 redirect if you move collection items, such as products or blog posts, from one page to another.

Example: You moved products from a Products Page with the URL https://mybusiness.com/shop1 to another Products Page with the URL https://mybusiness.com/shop2. In that case, a product with the URL https://mybusiness.com/shop1/item would now be https://mybusiness.com/shop2/item.

Redirect one item like this:

/shop1/item -> /shop2/item 301

Redirect all items on a page all like this:

/shop1/[name] -> /shop2/[name] 301

In the second example, the /shop1 page shouldn't be used for new products anymore because all product URLs will redirect to /shop2.

Other domains

Use a 301 redirect if you have a URL on your site that you want to lead to another domain.

Example, you had a page with the URL https://mybusiness.com/fundraiser that featured information about a fundraiser, but now you want the URL to link visitors directly to an external domain.

Follow these steps:

  1. In URL Mappings, create a redirect from /fundraiser to the external domain.
  2. Delete or disable the /fundraiser page in your site.

The redirect looks like this:

/fundraiser -> https://fundraiser.com/very-special-fundraiser 301
Note: Ensure the URL you're directing to begins with https://.

302 examples

Existing pages during updates

Use a 302 redirect when you don’t want a page visible while making updates.

Example: You have a Products Page for seasonal offerings and need to update it for the new season. Use a 302 to redirect visitors to your main Products Page temporarily.

Follow these steps:

  1. In URL Mappings, create the redirect from /seasonal-offerings to /main-products-page.
  2. Disable /seasonal-offerings and make your updates.

The redirect looks like this:

/seasonal-offerings -> /main-products-page 302

When you’re done updating /seasonal-offerings, follow these steps:

  1. Enable /seasonal-offerings.
  2. In URL Mappings, delete the 302 redirect.

Temporary pages during updates

This is similar to the above example, except instead of redirecting to an existing page, you create a temporary holding page while you make updates. For example, you can create a Cover Page that says “New offerings coming soon!” for the redirect.

Follow these steps:

  1. Create your temporary holding page. Give it a URL slug like /coming-soon.
  2. In URL Mappings, create the redirect from /seasonal-offerings to /coming-soon.
  3. Disable the /seasonal-offerings page and make your updates.

The redirect looks like this:

/seasonal-offerings -> /coming-soon 302

When you’re done updating /seasonal-offerings, follow these steps:

  1. Enable /seasonal-offerings.
  2. In URL Mappings, delete the 302 redirect.
  3. Delete /coming-soon, or disable it if you plan to use it for future updates.

Rotating between pages

Use 302 redirects if you want some pages to periodically redirect to another.

Example: You have four Products Pages, one for each season's sales, with the following URLs:

  • https://mybusiness.com/spring-sales
  • https://mybusiness.com/summer-sales
  • https://mybusiness.com/fall-sales
  • https://mybusiness.com/winter-sales

Because only one of these pages would be live at any given time, you can use 302 redirects to prevent links breaking. If summer is ending and you want to start your fall sales, follow these steps:

  1. Enable /fall-sales.
  2. In URL Mappings, create three 302 redirects from /summer-sales, /spring-sales, and /winter-sales to /fall-sales.
  3. Disable /summer-sales. In this example, /spring-sales and /winter-sales would already be disabled.

The redirects look like this:

/summer-sales -> /fall-sales 302
/spring-sales -> /fall-sales 302
/winter-sales -> /fall-sales 302

When fall is over and your winter sales start, enable /winter-sales, update your 302 redirects, and disable /fall-sales:

/summer-sales -> /winter-sales 302
/spring-sales -> /winter-sales 302
/fall-sales -> /winter-sales 302

Error messages

If there's an error in your URL mapping, you'll see a red error message and won't be able to save your changes. Use the information below to troubleshoot error messages.

Invalid mapping: Not enough parts

This means that a redirect is missing the arrow (->) or the redirect type (301 or 302).

Invalid mapping: Too many parts

This means that a redirect has more parts than necessary. Check that you only have the following, and that nothing is duplicated:

  • The old URL
  • The arrow (dash and greater than sign with no space between the symbols)
  • The new URL
  • The redirect type (301 or 302)

Invalid mapping: Expected to find 301 or 302

This means that there's an error in your redirect type. Only 301 and 302 are accepted here. Check that there are no extra digits or letters in the redirect type.

Visitors see 404 page

When a visitor activates a redirect more than once within two minutes, it sends them to a 404 page. This is a security precaution that helps prevent redirect loops.

Visitors will also see a 404 page if a redirect leads to a disabled or deleted page. Ensure your redirects point to pages that are enabled.

Was this article helpful?
128 out of 272 found this helpful