NerdTools

Fast, free online tools for sysadmins, developers, and nerds.

DNS Redirect

How do path and query forwarding work?

Path and query forwarding let you preserve parts of the original URL when redirecting.

Path forwarding

When enabled, the URL path is appended to your destination.

Example:

  • Redirect: old.example.comhttps://new.example.com
  • With path forwarding: old.example.com/blog/posthttps://new.example.com/blog/post
  • Without path forwarding: old.example.com/blog/posthttps://new.example.com

Query forwarding

When enabled, query parameters are preserved in the redirect.

Example:

  • Redirect: old.example.comhttps://new.example.com
  • With query forwarding: old.example.com?ref=emailhttps://new.example.com?ref=email
  • Without query forwarding: old.example.com?ref=emailhttps://new.example.com

When to use each

  • Enable path forwarding when your destination site has the same URL structure as the source.
  • Enable query forwarding when you need to preserve tracking parameters, filters, or other query data.
  • Disable both when you want all traffic to go to a single specific page regardless of the original URL.
Back to all articles