Redirects
Redirects let you send visitors from one URL path to another on the same domain. They are also used to return 410 Gone responses for permanently removed content. OptiPub tracks hit counts and timestamps for each redirect so you can monitor usage over time.
Navigate to Content → Redirects
Creating a Redirect
Click the Create button to open the redirect form.
| Field | Required | Description |
|---|---|---|
| Domain | Yes | The configured domain where this redirect will be active. Only verified domains are available |
| Type | Yes | Standard or Regex. Standard matches an exact path; Regex uses a regular expression pattern. Cannot be changed after creation |
| From | Yes | The source path to match. For standard redirects this is a relative path (e.g. promos/104842). For regex redirects this is a regular expression pattern. A leading / is stripped automatically. Cannot be changed after creation |
| To | Yes | The destination path or URL visitors are sent to. For regex redirects, capture groups from the From pattern can be used here (e.g. $1) |
| Code | Yes | The HTTP status code for the redirect |
Redirect Codes
| Code | Meaning | Description |
|---|---|---|
301 | Moved Permanently | The resource has permanently moved. Search engines transfer ranking to the new URL |
307 | Temporary Redirect | The resource is temporarily at a different URL. Search engines keep the original URL indexed |
308 | Permanent Redirect | Like 301, but the request method is preserved (e.g. POST stays POST) |
410 | Gone | The resource has been permanently removed. No destination is used — visitors see a "Gone" page |
Example — Standard Redirect
| Field | Value |
|---|---|
| Domain | example.com |
| Type | Standard |
| From | promos/104842 |
| To | pages/these-10-hacks-will-make-you-rich |
| Code | 307 |
This sends visitors from https://example.com/promos/104842 to https://example.com/pages/these-10-hacks-will-make-you-rich with a temporary redirect.
Example — Regex Redirect
| Field | Value |
|---|---|
| Domain | example.com |
| Type | Regex |
| From | old-blog/(.*) |
| To | blog/$1 |
| Code | 301 |
This permanently redirects any path under old-blog/ to the corresponding path under blog/ — for example, old-blog/my-post becomes blog/my-post.
Editing a Redirect
Click on any redirect in the list to view it, then click Edit to make changes. Only the To and Code fields can be updated. The Domain, Type, and From fields are locked after creation.
List View
The redirects list displays all redirects across domains in a searchable, filterable data table. The following columns are available:
| Column | Filter type | Default |
|---|---|---|
| ID | Number | Shown |
| Domain | Select | Shown |
| From | Text search | Shown |
| To | Text search | Shown |
| Regex | Boolean | Shown |
| Code | Number | Shown |
| Total Hits | Number | Shown |
| Last Hit | Date | Shown |
| Created | Date | Hidden |
| Updated | Date | Hidden |
Deleting a Redirect
Click the trash icon in the row of the redirect you want to remove, then confirm the deletion.
How Redirects Are Processed
When a visitor requests a URL on one of your domains, OptiPub checks for a matching redirect before attempting to resolve a page:
- Exact match — the request path is compared against all standard redirects for that domain
- Regex match — if no exact match is found, regex redirects for that domain are evaluated in order
- Redirect or Gone — if a match is found, OptiPub records a hit and either redirects the visitor (for
301,307,308) or returns a410 Goneresponse - Page resolution — if no redirect matches, normal page resolution continues
Updated 10 days ago
