Customizing your ShortStack campaign's domain, subdomain, or subfolder can provide benefits to marketing, branding, and SEO. Using these configurations, you can show your ShortStack campaign as if it exists on a domain you own. For example:
Custom domain, subdomain, and subfolder configurations can be complex and should be performed by an IT professional. Your web host may be able to assist you.
Note: For all cases where DNS is changed, you must continue to use your campaign URL's extension. For example, if your campaign URL is http://a.pgtb.me/ABC123 and you're using the contests.example.com domain, your custom domain's campaign URL will be http://contests.example.com/ABC123.
- For DNS configurations, you must have the ability to manage DNS settings on your domain registrar. For embedding, you must have the ability to create files and folders on your hosted web server.
- For reverse proxy, you must have the ability to edit your web server's configuration file(s).
To ensure your ShortStack campaign is free from duplicate content issues with search engines, it is important to specify a Canonical URL for your custom domain, subdomain, or subfolder.
- Add a new Code Widget with the following code, changing the href attribute to your custom domain, subdomain, or subfolder:
<link rel="canonical" href="http://mycontest.example.com/" />
- In the Placement section of the Code Widget dialog, choose After <head>
- Publish your changes.
- If you are pointing a root domain (example: acme.com), create an A record in your DNS that points to: 18.104.22.168 (for S1 campaigns) or 22.214.171.124 (for S2 campaigns).
- If you only want to point a subdomain (example: contests.acme.com), create an A record in your DNS for the subdomain (example: contests) that points to: 126.96.36.199 (for S1 campaigns) or 188.8.131.52 (for S2 campaigns).
- We automatically configure an SSL certificate for your domain upon the first request to our server. There is nothing you have to do on your end.
- Changes to DNS configurations may take several hours before the new settings are active.
There are two methods to host a ShortStack campaign within a subfolder on your domain (e.g., http://www.example.com/mycontest/): embedding and reverse proxy.
Embed Your Campaign
- Create a new subfolder (e.g., "mycontest") on your hosted website. You may do this through your host's file management interface, via FTP, or several other methods.
- In this folder, add a bare bones HTML file named index.html. See an example here.
- If you are using the example file, customize the Your page title and Your page description text.
- Embed your campaign by following the instructions in the Embedding a Campaign help doc. Paste the embed code into your barebones HTML file and save it to your web server.
Limitations of Embedding
Embedded campaigns utilize an iFrame on a page hosted on your web server. iFrames show external sites on your page rather than inserting content directly into your page. This means that the content of your ShortStack campaign will not be indexed by Google or other search engines. To get around this limitation, use a reverse proxy as described below.
Note: This is an advanced configuration that should be performed by an IT professional. An incorrect configuration can cause your web server to crash.
A reverse proxy is a configuration on your web server that allows it to provide content from another server, such as ShortStack's campaign servers. This allows you to maintain ShortStack's SEO support.
To use a reverse proxy with a ShortStack campaign, it should point a non-existent subfolder on your web server to your published campaign's "web" address.
You may also need to set up a reverse proxy for these paths:
- /fonts/: Point this path and all contained files and subdirectories to http://a.pgtb.me/fonts/
- /facebook/: Point this path and all contained files and subdirectories to http://a.pgtb.me/facebook/
Because there are many ways to configure reverse proxies, we cannot provide exact instructions. Please see the relevant documentation for your web server.