How to Use Custom Domains

Payara Cloud offers customers on the Standard or Premium subscription tiers the ability to associate custom domains to namespaces. This feature enhances the accessibility of your applications deployed to such namespaces for end users, by providing a personalized and easily recognizable URL.

When applications are uploaded to a specific namespace in Payara Cloud, a default URL is created. This URL is formed by concatenating your namespace and application names, resulting in a link like: (Note: This is a fabricated URL for illustration purposes).

However, these auto-generated URLs may not always align with your brand or be user-friendly, which is why the custom domain feature is valuable. It allows you to transform the default URL into a more brand-centric and user-friendly format such as,, and so on, simplifying the way end users access your deployed applications.

The custom domain feature currently supports only sub-domains. Therefore, you’ll need to map the Payara Cloud namespace URL to a sub-domain via your DNS management console. For instance, you can map the namespace URL to, not to

Add A Custom Domain

Select the namespace containing your application from the Namespace Navigator. In the Namespace Actions drop down menu, click Custom Domain

A screenshot displaying the menu to add a new domain
Figure 1. Namespace menu to add new domain

On the next screen, click Add Custom Domain.

Interface to add new domain
Figure 2. Button to click for adding a new domain

Enter the domain name you’d prefer to use for accessing your application in the Custom Domain Name field.

Interface for entering custom domain name
Figure 3. Custom domain addition screen on Payara Cloud

Click Set Custom Domain

You’ll now see the Custom Domain screen along with the information needed for setting up the DNS record.

Interface displaying DNS info for custom domain setup
Figure 4. DNS information screen for custom domain setup

For instance, if using Cloudflare as your domain host, create a new CNAME record in your domain dashboard as shown.

Cloudflare dns update view
Figure 5. Cloudflare domain record creation interface
  • ❶ Set record type to CNAME

  • ❷ Enter myapp for the sub-domain you used in Payara Cloud.

  • ❸ Paste the DNS record value copied from Payara Cloud’s custom domain screen

  • ❹ Save

Return to the custom domain setup screen in Payara Cloud.

Interface showing DNS info for custom domain setup
Figure 6. Screen displaying DNS info for custom domain setup

Click Check DNS

Your namespace should now be linked to the configured domain.

Interface displaying fully setup custom domain
Figure 7. Fully configured custom domain post DNS propagation
DNS propagation duration may vary based on your domain name provider, taking anywhere from a few minutes to 48 hours. Check DNS propagation using online tools such as

With the custom domain configured, all applications deployed to the namespace can be accessed as sub-paths of the set domain. For instance, an application deployed to the context path myapp1 would be accessible via the URL

Edit/Remove Custom Domain

You can always edit or remove configured domains for namespaces on the Custom Domain page.

Interface displaying fully setup custom domain
Figure 8. Custom domain page showing additional operations