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 ContentRedirects

Creating a Redirect

Click the Create button to open the redirect form.

FieldRequiredDescription
DomainYesThe configured domain where this redirect will be active. Only verified domains are available
TypeYesStandard or Regex. Standard matches an exact path; Regex uses a regular expression pattern. Cannot be changed after creation
FromYesThe 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
ToYesThe destination path or URL visitors are sent to. For regex redirects, capture groups from the From pattern can be used here (e.g. $1)
CodeYesThe HTTP status code for the redirect

Redirect Codes

CodeMeaningDescription
301Moved PermanentlyThe resource has permanently moved. Search engines transfer ranking to the new URL
307Temporary RedirectThe resource is temporarily at a different URL. Search engines keep the original URL indexed
308Permanent RedirectLike 301, but the request method is preserved (e.g. POST stays POST)
410GoneThe resource has been permanently removed. No destination is used — visitors see a "Gone" page

Example — Standard Redirect

FieldValue
Domainexample.com
TypeStandard
Frompromos/104842
Topages/these-10-hacks-will-make-you-rich
Code307

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

FieldValue
Domainexample.com
TypeRegex
Fromold-blog/(.*)
Toblog/$1
Code301

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:

ColumnFilter typeDefault
IDNumberShown
DomainSelectShown
FromText searchShown
ToText searchShown
RegexBooleanShown
CodeNumberShown
Total HitsNumberShown
Last HitDateShown
CreatedDateHidden
UpdatedDateHidden

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:

  1. Exact match — the request path is compared against all standard redirects for that domain
  2. Regex match — if no exact match is found, regex redirects for that domain are evaluated in order
  3. Redirect or Gone — if a match is found, OptiPub records a hit and either redirects the visitor (for 301, 307, 308) or returns a 410 Gone response
  4. Page resolution — if no redirect matches, normal page resolution continues