Blog/Paas

How to Set Up a Custom Domain and SSL on PaaS

|
8 min read
Cantech Cloud Hosting

When you first deploy an app, you get a default address that works but looks like a technical label. Real users expect your own name, such as yourbrand.com, with the small padlock in the browser that shows the connection is secure.

Setting this up takes only a few steps. The tricky part is knowing which choices matter.

Quick answer: To set up a custom domain and SSL on PaaS, choose how traffic will reach your environment (a CNAME record with a shared load balancer for testing, or an A record with a public IP for production), bind the domain in your environment’s settings, update your DNS records, wait for them to spread, then enable an SSL certificate that supports your custom domain, force HTTPS and test everything. Keep www and non-www consistent and renew certificates on time.

New to PaaS? Start with our guide on what is PaaS, or read the general guide on how to deploy a web application on PaaS.

What Is a Custom Domain and Why Does SSL Matter?

A custom domain is your own web address that points to your app. An SSL certificate encrypts the connection between visitors and your site, and turns on HTTPS.

You need both because:

  • Trust. Browsers warn visitors when a site is not secure.
  • Privacy. Logins, forms and payments should be encrypted.
  • Brand. Your own domain looks professional and is easier to remember.
  • SEO. Search engines prefer secure sites.

Before You Start

Have these ready:

  • A registered domain and access to its DNS settings
  • A working app in your environment
  • Knowledge of whether you want yourbrand.com, www.yourbrand.com or both
  • Time for DNS changes to spread, which can take from minutes to a few hours

Step 1: Choose How Traffic Will Reach Your App

On our platform there are two common options, and your choice depends on what your environment uses. According to our knowledge base:

Option Record type Best for
Shared Load Balancer CNAME redirect Development and test environments
Public IP DNS A record Production and higher traffic

For a real production site, many teams choose a public IP with an A record, because it can handle higher traffic and gives you more control. For staging, a CNAME with the shared load balancer is simpler and cheaper.

Step 2: Bind the Domain to Your Environment

Binding tells the platform which domain belongs to which environment. In the dashboard:

  1. Click the Settings button (the wrench icon) for your environment
  2. Open the Custom Domains tab
  3. In the Domain Binding section, type your domain, such as yourbrand.com or www.yourbrand.com
  4. Click Bind

Our knowledge base shows the same steps in its guides to binding a custom domain and using a custom domain in your environment.

If you want both www and non-www to work, bind both.

Step 3: Update Your DNS Records

Now go to the place where you manage your domain, such as your registrar or DNS provider, and add the right record.

  • For a CNAME setup: create a CNAME record that points your name, usually www, to the address the platform gives you for the environment.
  • For an A record setup: create an A record that points your domain to the public IP address of your environment.

A few helpful rules:

  • A root domain such as yourbrand.com usually cannot use a CNAME, so use an A record there
  • Remove old records that point to your previous host
  • Lower the TTL (the time records are cached) a day before you move, so changes spread faster

Step 4: Wait for DNS to Spread, Then Check

DNS changes are not instant. Test with:

  • Opening your domain in a browser, ideally in a private window
  • A DNS lookup tool, to see which address your domain now points to
  • A different network, such as mobile data, in case your device has cached the old address

If your old site is still showing, wait a little longer before changing anything.

Step 5: Turn On SSL

This is the step where many people get stuck, because there are different kinds of SSL options.

According to our knowledge base, Auto SSL can be switched on in the SSL section of the topology wizard, but it is not compatible with a public IP address and applies to the environment’s default domain only. That means it is useful for secure default addresses, but it will not cover your own custom domain on a public IP.

For your own domain, you need a certificate option that supports custom domains. Our knowledge base notes that attaching a public IP is what opens up features such as custom SSL. Our Laravel hosting page also mentions free Let’s Encrypt SSL. Because the right choice depends on your setup, ask our team which certificate option is best for your domain, and how renewals are handled. Our knowledge base explains Auto SSL in its guide to installing Auto SSL.

Step 6: Force HTTPS

Installing a certificate is not enough. You also want every visitor to land on the secure version.

  • Redirect HTTP to HTTPS on the server or in your app
  • Update your app’s URL setting to start with https, for example APP_URL in Laravel. Our guide on how to configure environment variables in a PaaS application explains how.
  • Choose one main version, such as https://yourbrand.com, and redirect the others to it
  • Fix mixed content, which happens when a secure page loads images or scripts over plain HTTP

Step 7: Test Everything

Check:

  • yourbrand.com and www.yourbrand.com both reach the right place
  • HTTP redirects to HTTPS
  • The padlock shows with no warnings
  • The certificate name matches your domain
  • Login, forms and checkout work over HTTPS
  • Images, scripts and fonts all load securely
  • Pages load quickly

Step 8: Plan for Renewals

Certificates expire. An expired certificate shows a scary warning to every visitor. Find out:

  • How long your certificate lasts
  • Whether it renews automatically
  • Who gets the reminder if it does not

Put the expiry date in a calendar, even if renewal is automatic.

Step 9: Move Traffic Between Environments Without Downtime

When you release a big change, you may want to switch customers from the old environment to a new one smoothly. Our knowledge base describes a swap domains function, and an API or CLI method, that moves traffic between environments without downtime. This is useful for testing a new version fully before it goes live. Read our guide on how to evaluate a PaaS platform for production for more on safe releases.

A Real-World Example

Imagine a small agency launching a client’s website. They first use the shared load balancer and a CNAME for the www version, which works well during testing. For launch, they attach a public IP, bind both the root domain and the www version, and set an A record for the root domain.

On launch morning the site loads over the old host for some visitors, which is just DNS spreading. By afternoon everyone sees the new site. They notice the images on the home page load over plain HTTP and trigger a warning. They fix the image links, add the HTTPS redirect and test again. They also put the certificate expiry date in the team calendar. A few small checks made the launch clean.

Common Problems and Fixes

Problem Likely cause Fix
Domain shows the old site DNS not spread yet or old record Wait, and check the record values
Domain does not load at all Wrong record or domain not bound Check the binding and DNS record
Browser shows a certificate warning Certificate does not cover your domain Use a certificate that supports your custom domain
Padlock missing on some pages Mixed content Change HTTP links to HTTPS
Redirect loop Conflicting redirects between app and server Keep one redirect rule
www works but root does not Only one version bound or recorded Bind and set records for both
Certificate expired Renewal missed Renew now and set reminders

Domain and SSL Checklist

Step Done
Traffic option chosen (CNAME or A record) Yes or no
Domain bound in environment settings Yes or no
DNS records updated, old ones removed Yes or no
DNS spread and tested Yes or no
SSL certificate that supports the domain installed Yes or no
HTTP redirects to HTTPS Yes or no
App URL updated to HTTPS Yes or no
Mixed content fixed Yes or no
Renewal date noted Yes or no

Where to Go Next

For the full go-live routine, read how to deploy a web application on PaaS. For safety, see our PaaS security checklist. You can also see how our plans work on the PaaS pricing page.

Final Thoughts

A custom domain and SSL turn a technical address into a trusted brand. Choose the right record type, bind your domain, update DNS, install a certificate that covers your domain, force HTTPS and keep an eye on renewals.

Need a hand with your first launch? Explore our PaaS platform or speak to our team.

Frequently Asked Questions

How do I connect a custom domain to a PaaS app?

Bind the domain in your environment settings, then update your DNS records so the domain points to your environment.

Should I use a CNAME or an A record?

Use a CNAME with a shared load balancer for development and testing, and an A record with a public IP for production, as recommended in our knowledge base.

How long does DNS take to update?

Often minutes, but sometimes a few hours. Plan launches with this in mind.

Does Auto SSL cover my custom domain?

According to our knowledge base, Auto SSL applies to the environment’s default domain only. For your own domain, confirm the right certificate option with our team.

Can I use free SSL?

Our Laravel hosting page mentions free Let’s Encrypt SSL. Ask our team how to use it with your custom domain.

Why does my site say it is not secure?

The certificate may not cover your domain, may have expired, or the page may load some content over plain HTTP.

 

#custom domain paas#how to set up a custom domain and ssl on paas#paas ssl
Aski Shrivastav
Aski Shrivastav

Author

Aski Shrivastav has 3–4 years of experience in server hosting, cloud computing, and PaaS platforms. She is passionate about technology and loves writing blogs that simplify technical topics and share useful insights with readers.