Use multiple domains using CNAMEs
Zeno
Last Update 2 maanden geleden
Since a FunnelFlux license key is bound to a single primary tracker domain, you can use multiple domains using CNAME records to alias the primary domain.
What is a CNAME record?
CNAME stands for Canonical Name. CNAME records can be used to alias one name to another.
For example, if you have a server where you keep all of your documents online, it might normally be accessed through docs.example.com. You u may also want to access it through documents.example.com
One way to make this possible is to add a CNAME record that points documents.example.com to docs.example.com
When someone visits documents.example.com they will see the exact same content as docs.example.com
How do we create CNAME record?
To create a new CNAME record, best is to see your DNS provider documentation to help you create a new CNAME record.
Generally, you will add a record such as:
with a target/result of
and the record type set to CNAME. It's quite a simple pointer of your domain or subdomain A to some domain or subdomain B.
How can we setup an alias CNAME'd domain with Funnel Flux?
If you used our installation scripts/deployment manager, then there is no particular action you need to take with your server when using CNAMEs.
However if you have your own server, chances are the webserver (e.g. nginx) is configured to point domain1 at folder1, domain2 at folder2 and so on. It is up to you to check this and either a) make a "virtual host" or site that all domains point to by default, or b) add any additional domains to your config.
This could be through addon domains in cPanel, adjusting Nginx config directly to add the domain to an existing virtual host, and so on. This side of things is out of our hands as it completely depends on how you set up your server, it has nothing to do with FunnelFlux.
Once that is sorted, there is no particular action required for using a CNAME domain other than replacing your tracking links with it manually, since FunnelFlux will generate links using the default, licensed domain.
Note that If you use an alias domain for a tracking link, then you must use this same alias on your landing page for the Action Links.
This will need be done manually by you since you control the landers and the links you use.
It's important to use the same domain for a user's journey since cookies are used, otherwise, cookies cannot be read by the Action Link - see the example below:
Primary Tracker Domain:Entrance URL:
Action Link URL:
CNAME'd Domain:Entrance URL:
Action Link URL:
Note: There is a token called {flux-domain} that you can pass to your landers, which will pass the name of the tracking domain (or alias domain if used).
Thanks to this, you can build your action link dynamically using PHP/javascript. You will need to implement this yourself, since the method to do it would depend on your scenario.
We have a separate guide on this here.
In general it will be a simple GET from the URL and inject into the page HTML. Below is an example using PHP and Javascript, assuming you pass this to your lander URLs using ...&ffdomain={flux-domain}
PHPAdd this code to the top of your lander. Your lander will need to be a .php file or your server needs to be configured to process PHP in HTML files.
and then in the page HTML inject the domain
You can make this happen in one line of code within the element but the verbose format above can make it easier to understand.
JavascriptMuch like above, you will use Javascript to get the URL parameter from your URL and then inject it into the links in the HTML.
Place the following code in your page, ideally in or at the start of .
Now within your page HTML you can inject any query string parameter by referencing the key, e.g. if you passed ...&ffdomain={flux-domain}, the key is ffdomain and you would use is ffdomain and you could output a simple element with your action link using:
Note that a better (but more complex) way to do this is generally to manipulate the DOM rather than using document.write.
Finally, The CNAME'd domain is only used to mask your redirect tracker domain URLs, not as a fully functional licensed domain.
Pros:
-
Alias the primary tracker domain
-
Can be used to alias the tracking links (Entrance and Action Link URL's should be the same)
Cons:
-
PROHIBITS you to log into the FunnelFlux dashboard "/admin" -- for this you must use your original, licensed domain