Using a custom domain

Ticketmatic supports custom domains for the ticket sales flows. This allows you to use any domain, including a (sub)domain of the customer, for the web sales pages instead of the default apps.ticketmatic.com. If your own domain is for example www.mycustomdomain.com, you could set up tickets.mycustomdomain.com or shop.mycustomdomain.com for the web sales widgets.


Setting up the custom domain

In order to use a custom domain (tickets.mycustomdomain.com), you need to perform the following steps.

1. Get an ssl certificate for the custom domain

Ticketmatic only allows https traffic, so you need to have a valid ssl certificate for the custom domain and set this up correctly.

2. Setup a proxy on the custom domain to the Ticketmatic servers

You need to setup a proxy on the custom domain that redirects traffic to the Ticketmatic servers. This can be handled easily in the http server. For example for nginx, you can use the following configuration:

 1server {
 2    listen 443 ssl;
 3    server_name tickets.mycustomdomain.com;
 4
 5    # Proxy the custom domain to https://apps.ticketmatic.com
 6    location / {
 7        proxy_set_header Host $host;
 8        proxy_set_header X-Real-IP $remote_addr;
 9        proxy_set_header X-Forwarded-Proto $scheme;
10        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
11        proxy_pass https://apps.ticketmatic.com/;
12    }
13}
14
15# Redirect all http traffic to https
16server {
17    listen 80;
18    server_name tickets.mycustomdomain.com;
19
20    add_header Strict-Transport-Security max-age=15768000;
21
22    rewrite ^(.*)$ https://$host$1 permanent;
23}

When a user requests a web sales page on the custom domain, the request will be proxied to Ticketmatic and the web sales page will be delivered to the user.

Only the initial request will use the proxy. All subsequent requests for assets and javascript calls to the backend will go directly to the Ticketmatic servers without touching the custom domain. This will keep the load on the custom domain to a minimum.

3. Allow traffic from the custom domain in Ticketmatic

A Ticketmatic account only allows traffic from domains that you explicitely specify:

  • Go to the Account parameters module in the Settings app
  • Add the custom domain to the Allowed domains. Make sure to include the protocol:

image


Questions?

We're always happy to help! Send us an e-mail