How to use destination variables

Destination URLs can be dynamic. You might want to include part of the source URL in your destination so your visitors are landing directly at the right place.

redirect.pizza supports the following variables to use in your redirect. These will be automatically replaced when the redirect is performed based on the visitor's info. Multiple destination variables can be used in a single URL.

All examples below are based on the following incoming URL:
https://www.redirect-me-plz.co.uk/contact

{domain.fqdn} - example: www.redirect-me-plz.co.uk
{domain.label} - example: www.redirect-me-plz
{domain.root} - example: redirect-me-plz
{domain.extension} - example: co.uk
{domain.subdomain} - example: www
{domain.subdomains.0} - example: www
{path} - example: contact
{path:auto_trailing_slash} - example: contact/
{segments.0} - example: contact - available till {segments.9}
{query.xxxxx} - example: value - The query parameter is the xxxxx position.
{method} - example: POST
{ip} - example: 127.0.0.1
{userAgent} - example: Mozilla/5.0 (iPad; U; CPU.....)
{referrer} - example: example.com/path
{referrerHost} - example: example.com
{scheme} - example: https
{country} - example: US
{continent} - example: NA
{city} - example: Mountain View
{latitude} - example: 37.4192
{longitude} - example: -122.0574
{subdivision.code} - example: CA
{subdivision.name} - example: California

Broken destination monitor

When using the broken destination monitor, you can use the following variables as well:

{monitoring.enabled} - example: true
{monitoring.status} - example: up
{monitoring.lastCheckStatusCode} - example: 200

Examples

Example 1
Source: https://my-old-site.com/
Destination: https://fancy-new-site.com/?rel={domain.label}
Will be redirected to: https://fancy-new-site.com/?rel=my-old-site

Example 2
Source: https://my-old-site.com/subpage
Destination: https://fancy-new-site.com/old/{path}
Will be redirected to: https://fancy-new-site.com/old/subpage

Example 3
Source: https://wildcard.my-old-site.com/
Destination: https://{domain.subdomain}.fancy-new-site.com
Will be redirected to: https://wildcard.fancy-new-site.com

More articles

Walkthroughs
GoDaddy: Forwarding with HTTPS support
Network Solutions: Forwarding with HTTPS support
Namecheap: Forwarding with HTTPS support
Hover: Forwarding with HTTPS support
TransIP: Forwarding with HTTPS support
Cloudflare: Forwarding with HTTPS support
Amazon Route 53: Forwarding with HTTPS support
NS1: Forwarding with HTTPS support
DigitalOcean: Forwarding with HTTPS support
Google Cloud DNS: Forwarding with HTTPS support
EuroDNS: Forwarding with HTTPS support
Azure DNS: Forwarding with HTTPS support
DNS Made Easy: Forwarding with HTTPS support
Freenom: Forwarding with HTTPS support
Mijndomein: Forwarding with HTTPS support

Can’t find the answer you’re looking for?

24 hours
E-mail us
support@redirect.pizza
Start a chat
Online 9:00 - 21:00 CEST
Phone
Available with Enterprise
Pricing Background
Domain redirects delivered hassle-free

Get started right away

  • Free plan
  • No creditcard required
Features

Everything
you need