Skip to main content

Redirect host (www)

Redirect to another host, keeping the path and query — add or remove www, or send aliases to one domain.

TyperedirectHost
CategoryTransform
RequiresGoma Gateway 1.2.0 or newer
Gateway version

A route using this middleware fails to load on a gateway older than 1.2.0. Miabi does not read the running gateway's version, so nothing stops you saving it — the route is what reports the problem.

Fields​

FieldTypeRequiredDefaultDescription
wwwone of add, removeno—add: example.com → www.example.com. remove: www.example.com → example.com.
hosttextno—Instead of www: send every other host on the route here. Example: example.com.
permanenttrue/falseno—Use 301 instead of 302.