Documentation
Back to website >

7.A Affiliate username in subdomain

*It is possible to have "username.{your-domain.com}" urls, however this feature is not easy to configure.

Your website will need to respond to wildcard subdomain requests. This functionality is configured with your DNS and possible hosting company.
Please understand this is not a functionality of socialbug,
we cannot help you configure your DNS or speak with your hosting company to explain how to properly configure this.

All we can provide is detailed requirements on how the configuration should opperate.

Lets assume we have a domain of "domain.com" and we want affiliate urls to be username.domain.com.

Wild card subdomains should be configured for your domain. This means that any subdomain request should load your site.
So for example,

random.domain.com
who-am-i.domain.com
hello.domain.com

basically anything typed before the domain.com should load your site.

Please pay attention to this detail, your site should be loaded on the subdomain that was requested and NOT forwarded to the main domain.
So if we went to random.domain.com and you let the page load, then when you look in your browser URL it should still say
random.domain.com

Many people missunderstand this requirement and set it up so random.domain.com gets forwarded to domain.com. This is incorrect. Your site MUST load and stay on the subdomain that was used.

Once you get the subdomain correctly loading your site, then you can enable the affiliate username setting in socialbug.
Socialbug only requires 1 page load on the subdomain to set the tracking cookie. So if a customer loaded the url
random.domain.com and then navigated to the top level domain e.g domain.com/shop that would be ok, the tracking cookie will still be in place.

Some notes:

Your site may contain hardcoded urls (e.g non relative urls). Wordpress sites usually load static urls. This means the site may load on the subdomain but clicking on any link will revert back to the top level domain.
Also becareful of cross domain calls on scripts, so make sure to have your developer check the console to make sure none of these errors are happening.


If you successfully do the configuration, we would appreciate it if you
provided us with your hosting company name and configuration steps.

 

Blue host Tips

  1. Login to your Bluehost Control Panel
  2. Click the Subdomains icon, located in the Domains section.
  3. In the "Subdomain" name field, enter the "*" character. (Shift + 8)
  4. Leave the "Document Root" set to default.
  5. Select "Create".

    The key is to make sure there are no other subdomains in there and to delete the pre-filled "wildcard" subfolder that gets created.


    If your domain have SSL you will need Wild Card Subdomain SSL also.