TenanciTenanci

Help centerSEO

Redirects

301, 302, 307 and 308 redirects per domain, applied at the edge before the origin, with CSV import and export.

When a customer moves to a new site, the old URLs are still on Google, in links from other sites and in campaigns. Redirects send whoever arrives through them (people and crawlers) to the new page, without losing rankings. On Tenanci they live on the domain and are applied at the edge, before the request reaches the origin.

Redirect types

Type When to use
301 · permanent the page moved for good (the default; passes relevance to the new address)
302 · temporary promotions or maintenance; Google keeps the old address
307 · temporary (keeps method) like 302, but form submissions (POST) stay POST
308 · permanent (keeps method) like 301, keeping the method

Each domain takes up to 5,000 redirects.

Add a redirect

  1. Open the Redirects tab.
  2. Under From, enter the old path (/old). You can paste the full URL: only the path is kept.
  3. Under To, enter the destination: a path on the same domain (/new) or an https:// address.
  4. Pick the Type and click Add.

In the list, change the type right in the Type column, use Filter… to find a redirect and the trash icon to remove it.

How matching works

  • Exact path: /about-us matches /about-us and /about-us/. Case matters.
  • Prefix with /*: /blog/* → https://blog.example.com/ sends /blog/2024/post to https://blog.example.com/2024/post (the rest of the path goes along).
  • With parameters: /?page_id=123 only matches when the URL has those same parameters, in any order.
  • Visit parameters: a /path destination keeps the URL's parameters (?utm_source=...), unless From has parameters. An https:// destination is used as is.
  • Priority: an exact path beats a prefix; among prefixes, the longest wins.

Tenanci rejects redirects that would create a loop (/a → /b → /a), that point to their own address or that use the edge's reserved paths.

Import a spreadsheet (CSV)

  1. Build the file with the columns from, to and, optionally, status (no status means 301). Commas, semicolons or tabs all work; the header row is optional and lines starting with # are ignored.
  2. Under Import CSV, click Choose CSV file.
  3. Check the count of valid rows and rows with problems. Problems are listed per row (invalid source, invalid destination, repeated source, over the limit…). When a source repeats, the first one wins.
  4. Pick the Mode: Merge (update and add) keeps the current list and updates the ones with the same source; Replace everything deletes the current list and keeps only the file.
  5. Click Import N redirect(s).
from,to,status
/?page_id=12,/about,301
/services/teeth-cleaning,/treatments/teeth-cleaning,301
/blog/*,https://blog.smiledental.com/,301
/black-friday,/deals,302

The file can be up to 2 MB. A CSV that would create loops is rejected as a whole.

Export

Click Export CSV to download the current list (columns from,to,status). It's a good backup before a Replace everything.

Redirects or routes?

Routes can redirect too, with inheritance from the project to its domains. Use Redirects for lists of a domain's old URLs (migrations, pages that moved), especially when they come from a spreadsheet. Redirects are evaluated before routes.

Through the API

Create one at a time with POST /domains/:id/seo/redirects:

cURL
curl -X POST https://api.tenanci.com/v2/domains/dom_4h7n1q/seo/redirects \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"from":"/services/whitening","to":"/treatments/whitening","status":301}'

Or send the spreadsheet with POST /domains/:id/seo/redirects/import: the CSV goes in the body (text/csv), in a file field (multipart/form-data) or as JSON ({"csv": "...", "mode": "merge"}). With dryRun the API only checks and returns what would be created, updated and removed, without saving:

cURL
curl -X POST "https://api.tenanci.com/v2/domains/dom_4h7n1q/seo/redirects/import?mode=merge&dryRun=true" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
  -H "Content-Type: text/csv" \
  --data-binary @redirects.csv
# → { "created": 41, "updated": 3, "removed": 0, "problems": [ ... ], "total": 45, "dryRun": true }

To list, export, change and remove, use GET /domains/:id/seo/redirects, GET /domains/:id/seo/redirects/export, PATCH /domains/:id/seo/redirects/:rid and DELETE /domains/:id/seo/redirects/:rid.