Managing the App
Settings
Custom Domain
10min
a domain name, also known as a url or web address, is the digital location where visitors can find your site every site or web service hosted on back4app containers automatically receives a free, unchanging b4a run address each site hosted on back4app can be accessed through its unique back4app subdomain, taking the form of \[appname username] b4a run however, back4app also offers you the flexibility to use your own custom domains with our containers feature managing custom domains with back4app containers is straightforward we oversee the creation of tls certificates and automatically redirect http to https for all your custom domains, including wildcard domains utilizing custom domains gives you the opportunity to make your sites accessible via unique domain names like www yourcustomdomain com http //www yourcustomdomain com/ or docs example dev we support all top level domains for your custom domains let's explore how to establish your domains on back4app containers! 1 register your custom domain the first step in setting up your back4app containers is to register a custom domain you can do this through any domain registration service of your choice if you have not yet registered your domain, please do so before proceeding with the next steps 2 add your domain once you've registered your domain, you can add it to your back4app containers here's how you do it navigate to your app on back4app containers go to settings click on the domain tab enter your registered domain in the provided field following these steps, back4app will provide instructions on how to add the records to your dns server 3\ configure dns server this domain is now waiting for external dns propagation (that can take up to 24 hours) or has not been configured properly confirm you have configured this domain properly with the suggestions below recommended point alias, aname, or flattened cname record the given custom b4a run url create an alias, aname, or flattened cname record for your domain pointing to the given custom b4a run url examples type name target cname www 123456 custom b4a run alias @ 13456346 custom b4a run aname mysubdomain 62345 custom b4a run after adding the new records on your dns server back4app will validate the configuration and then will start to generate a ssl certificate notice that dns propagation can take up to 24h 4\ setting up redirect domains you can also set up redirect domains on back4app you can configure domain redirects to all domains configured on back4app containers to your app 5 custom domain config example configuring the domain congnitivengine com to reply as www cognitivengine com on back4app containers in this example we will use cloudflare as the dns server 5 1 add the domain to back4app containers add www cognitivengine com to the back4app containers and copy the given custom b4a run url 5 2 configure the dns server for www cognitivengine com now, you need configure the dns server to recognize your new domain create a new cname record using www on name field and the given custom url on target check the image below after that, back4app will detect the new dns configuration, validate it, and then start the process of generating the certificates once the certificate generation and validation are completed, you will see a confirmation 5 3 configure cognitivengine com as a redirect to www cognitivengine com now you can set up the cognitivengine com domain as a redirect to www cognitivengine com go to your dns server and configure the root domain as described below add a new cname record on your dns server using these values use the "@" symbol (which is used for root) and the address value generated by the back4app domain turn on the proxy option that's it! now you've successfully configured your domain and subdomains on back4app containers remember, each step is essential to ensure the correct functioning of your domain and subdomains