1. Trustname Support
  2. Solution home
  3. Domain Settings & DNS Management
  4. URL Forwarding
Open navigation

Dynamic Placeholders for URL Forwarding (Coming Soon)

Note: This feature is currently under development and not yet available. The following examples illustrate how it will work once implemented.


When setting up URL forwarding (coming soon), you’ll be able to use the following dynamic placeholders to customize the destination URL based on the incoming request:

PlaceholderDescription
{*host*}Full hostname including subdomain (e.g. www.current.com)
{*domain*}Root domain only (e.g. current.com)
{*subdomain*}Subdomain part only (e.g. login in login.current.com)
{*wildcard*}Matches any subdomain in the request (e.g. shop in shop.current.com or blog in blog.current.com) and inserts it into the destination URL.


URL forwarding allows you to redirect subdomains of your domain (like www.current.com) to a different destination. You’ll be able to use dynamic variables to customize where users are sent.


Examples of Using Placeholders for URL Forwarding


Example 1: Basic Host Redirect

  • Host: www
  • Points to: http://{*domain*}/?ref={*host*}
  • What happens: Visiting http://www.current.com redirects to http://current.com/?ref=www.current.com


Example 2: Full Host Reference

  • Host: promo
  • Points to: http://target.com/?ref={*host*}
  • What happens: Visiting http://promo.current.com redirects to http://target.com/?ref=promo.current.com


Example 3: Subdomain Only

  • Host: login
  • Points to: http://target.com/?ref={*subdomain*}
  • What happens: Visiting http://login.current.com redirects to http://target.com/?ref=login


Example 4: Wildcard Subdomain Redirect

  • Host: *
  • Points to: http://{*wildcard*}.target.com
  • What happens: Visiting http://shop.current.com redirects to http://shop.target.com, http://blog.current.com redirects to http://blog.target.com, etc.

Summary

  • {*host*} – Full host (e.g. www.current.com)
  • {*domain*} – Base domain (e.g. current.com)
  • {*subdomain*} – Subdomain only (e.g. login)
  • {*wildcard*} – Subdomain when using * as Host


Stay tuned for updates when this feature goes live!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article