Redirects and URL routing in SGEN
SGEN checks every incoming URL against your redirect rules before loading any page. A match sends the visitor to your chosen destination — permanently (301) or temporarily (302). No match? SGEN looks for a published page with that slug. Still no match? It shows your custom 404 page. The Redirects area is at /sg-admin/redirects, part of the SEO & Performance module included on every plan. The most common mistake: renaming a page slug without adding a 301 redirect first — that breaks every external link and search result pointing to the old address.
Redirect rules are checked before SGEN looks for any page content. A rule on /old-path catches requests before SGEN even tries to load a page with that slug.
Most site changes — slug renames, page reorganisation, platform migration — are permanent. When in doubt, use 301. A 302 that stays in place for months behaves unpredictably in search results.
Changing a page slug without adding a 301 redirect breaks every external link and search engine listing pointing to the old address. Add the redirect before publishing the slug change.
How SGEN routes URLs
When a visitor requests a URL on your site, SGEN checks it against a routing layer before any page content is loaded.
Visitor request │ ▼ Redirect rules checked (sg-admin/redirects — SEO & Performance module) │ match found → send visitor to Destination URL │ no match ▼ SGEN URL routing ┌─────────────────────────────────────────────────────────┐ │ / → homepage (site_homepage setting) │ │ /Home → homepage (same as /) │ │ /Home/index → 404 (not a public path) │ │ /<page-slug> → published Page record │ │ /<blog-slug>/ → blog archive │ │ /<blog-slug>/<cat>/<post-slug> → blog post │ │ unrecognised path → 404 (site_404page setting) │ └─────────────────────────────────────────────────────────┘ Key points:
- Redirect rules fire before the page renders. A redirect rule on
/old-pathcatches requests before SGEN looks for a page with that slug. - The homepage is controlled by the
site_homepagesetting — it is a Page record ID, not a hard-coded path. /Homeand/serve the same homepage./Home/indexreturns a not-found response and is not a public path.- Blog post URLs follow the pattern
/<blog-slug>/<category-slug>/<post-slug>. The blog slug and category slugs are set in the blog admin. - Unmatched URLs display the page set in
site_404page.
Redirect types — 301 vs 302
A redirect sends visitors — and search engines — from one URL to another. SGEN supports two standard types.
| Type | Name | Meaning | When to use |
|---|---|---|---|
| 301 | Permanent | The page has moved for good. Search engines should update their index to the new URL and transfer the existing SEO value. | Renaming a page, restructuring URLs, moving content to a new address permanently. |
| 302 | Temporary | The move is short-term. Search engines should keep the original URL in their index because it will be used again. | A/B testing, maintenance pages, seasonal campaigns, short-term promotions. |
When in doubt, use 301. Most site changes — slug renames, page reorganisation, migration from another platform — are permanent. A 302 that stays in place for months can cause search engines to stop following the redirect; a 301 does not have this problem.
Creating a redirect rule
Redirects are managed at /sg-admin/redirects. This area is part of the SEO & Performance tools, which are included on every plan.
Go to Redirects → Add New (/sg-admin/redirects/add_new).
Enter the Target — the old URL path you want to catch (for example: /old-about-us).
Enter the Destination — the URL visitors should land on (for example: /about).
Set the Type: choose 301 - Permanent or 302 - Temporary.
Save the rule. The rule is active immediately. Test by visiting the Target path on your site.
Redirect fields reference
| Field | Required | Description |
|---|---|---|
| Target | Yes | The URL path to match — the old address visitors (or search engines) are hitting. Enter the path only, starting with /. Example: /old-contact. |
| Destination | Yes | Where to send the visitor. Can be a path on your site (/contact) or a full URL. |
| Type | Yes | 301 - Permanent or 302 - Temporary. Controls how browsers and search engines treat the redirect. |
| Is Regex match? | No | When turned on, the Target is treated as a regular expression pattern instead of a literal path. Useful for matching groups of URLs. |
| Priority | No | A number that controls the order in which rules are evaluated. Lower numbers run first. |
| Stop Processing | No | When turned on, no later redirect rules are checked after this rule fires. Prevents unintended chaining. |
Priority and regex matching
Rules with a lower priority number are evaluated before rules with a higher number. When you have both specific and broad rules, place specific rules at a lower priority so they are not overridden by a broad rule that would also match.
Example — priority ordering:Priority 1: Target = /blog/2024/old-post-title → Destination = /blog/our-storyPriority 10: Target = /blog/.* → Destination = /blog (catch-all)A visitor hitting /blog/2024/old-post-title matches Priority 1 firstand goes to /blog/our-story — not the catch-all. /.* matches every URL on your site. Always test regex rules on staging before applying to live.Bulk import and export
For large-scale redirect work — such as migrating from another platform — adding rules one at a time is impractical. The Import / Export screen at /sg-admin/redirects/import_export lets you load or download redirect rules in bulk.
Exporting existing rules is useful for backing up rules before making bulk changes, migrating rules from a staging site to a live site, and reviewing or auditing the full rule set outside the admin.
Importing rules is the recommended approach when moving a site from another platform where you have a list of old URLs, making a large restructure that affects many pages at once, or setting up a new site where redirects have been prepared in advance.
Migration workflow — recommended order:
Before domain cutover: 1. Collect all old URLs from the previous platform. 2. Map each old URL to its new SGEN equivalent. 3. Import the full list via Import / Export on staging. 4. Test a representative sample of redirects. 5. Export the verified rule set. 6. Import the verified rule set on live. 7. Perform the domain cutover. Homepage routing
The page that serves your site's root URL (/) is set in Settings at /sg-admin/settings. The setting is called Set Homepage and it stores the Page record ID (site_homepage).
Create or identify the Page you want to serve as the homepage.
Go to Settings (/sg-admin/settings).
Find Set Homepage and select the target page.
Save. The change takes effect immediately.
The same Page renders at both / and /Home. Both paths serve the homepage. /Home/index is not a public path and returns a not-found response.
body.page-<slug> break when a page is set as the homepage, because the slug class is removed from the body element when a page serves as root. Use body.page_id-<n> instead (where <n> is the numeric Page ID).The visitor 404 page
When a visitor reaches a URL that does not match any page, post, or redirect rule on your site, SGEN shows a not-found page. The page displayed is controlled by the Set 404 Page setting in /sg-admin/settings (stored as site_404page — a Page record ID).
Create a Page with the content you want visitors to see when they reach a broken or missing URL. Include helpful navigation links so visitors can find what they were looking for.
Go to Settings (/sg-admin/settings).
Find Set 404 Page and select the page you created.
Save.
| Element | Why it helps |
|---|---|
| Clear message | Confirm to the visitor that the page they requested is not available. |
| Navigation links | Give visitors a path back to useful content — homepage, blog, contact. |
| Search (if available) | Let visitors search for the content they were looking for. |
| Helpful tone | Reassure rather than alarm. The visitor arrived by following a broken link — it is not their fault. |
Common pitfalls
The most common source of broken links. Every time a page slug changes, add a 301 redirect from the old path before publishing the change.
A 302 keeps the old URL in search engine indexes. If the page has permanently moved, use 301 so search engines update their records and carry SEO value to the new URL.
A redirect chain occurs when URL A redirects to URL B, which redirects to URL C. Each hop adds a small delay and can reduce SEO value passed. Collapse chains to a single rule from A directly to C.
A loop occurs when URL A redirects to URL B, and URL B redirects back to URL A. Visitors see a browser error. Always check that the Destination URL does not itself redirect back to the Target.
Staging and live environments have separate redirect rule sets. After testing on staging, export the rules and import them on live before the domain goes live.
When a page is set as the homepage via site_homepage, the slug-based body class (body.page-<slug>) is no longer present. Use body.page_id-<n> with the numeric Page ID instead.
Quick reference
Admin paths
| Screen | Path |
|---|---|
| Redirect list | /sg-admin/redirects |
| Add new redirect | /sg-admin/redirects/add_new |
| Import / Export | /sg-admin/redirects/import_export |
| Settings (homepage + 404 page) | /sg-admin/settings |
| Search and Replace | /sg-admin/tools/search_replace |
Redirect type decision
| Situation | Type |
|---|---|
| Page permanently renamed or moved | 301 Permanent |
| Site migration — old platform to SGEN | 301 Permanent |
| Temporary campaign page | 302 Temporary |
| A/B test variant | 302 Temporary |
| Maintenance page (short-term) | 302 Temporary |
| Unsure | 301 Permanent (safer default) |
URL routing summary
| Path | Resolves to |
|---|---|
/ | Homepage (controlled by site_homepage) |
/Home | Homepage (same as /) |
/Home/index | Not found (not a public path) |
/<page-slug> | Published Page record |
/<blog-slug>/<cat>/<post-slug> | Blog post |
| Unmatched path | Not-found page (controlled by site_404page) |
