If you are hosting a Java application with Apache Tomcat in Plesk, adding the domain correctly is the first step before you deploy your WAR file, set up your virtual host, and connect the application to the right hostname. In a typical hosting setup, the domain is what routes visitors to your Tomcat-based site, while Plesk handles the hosting settings, document root, DNS-related options, and web service configuration.
In an ITA managed hosting environment with My App Server, the domain can be connected to a private Tomcat instance or a Java application server running inside your hosting account. This is especially useful for JSP hosting, servlet hosting, and smaller Java applications that need a dedicated JVM but do not require a full enterprise platform. The steps below explain how to add a domain in Plesk for a Tomcat application, how to point it to the correct app server, and what to check if the site does not load as expected.
When you should add a domain for a Tomcat application
You normally add a domain in Plesk when you want a web address such as example.co.uk to serve a Java application running on Tomcat. This can be a new application, an existing WAR deployment, or a JSP-based site that you want to access through a clean domain rather than a temporary path or internal address.
Common use cases include:
- Deploying a WAR file to a fresh domain.
- Mapping an existing Tomcat application to a new hostname.
- Creating a separate domain for a test or staging app.
- Setting up a subdomain for a Java service, such as app.example.co.uk.
- Hosting multiple small Java applications under one Plesk account.
In a managed hosting setup, the domain usually points to a hosting subscription, while Tomcat runs as a separate service or private JVM through the My App Server extension. That separation makes it easier to manage the web server, the Java runtime, and the application itself.
Before you add the domain in Plesk
Before changing anything in Plesk, confirm the following:
- You have access to the correct Plesk subscription or service plan.
- The domain name is registered and ready to use.
- Your Tomcat application or WAR package is prepared for deployment.
- You know whether the app should run on the main domain, a subdomain, or an alias.
- If you are using My App Server, the Java/Tomcat service is installed or ready to be installed.
If you plan to use a private JVM, check which Java version your application needs. Many Tomcat applications work with more than one Java version, but some legacy apps depend on a specific release. It is better to verify this before connecting the domain, so you can avoid deployment issues later.
How to add a domain in Plesk for Tomcat
The exact labels in Plesk can vary slightly depending on the hosting provider, but the process is usually similar. In a standard Plesk environment, you can add a domain from the Domains section and then connect it to your Tomcat application through hosting settings or the My App Server interface.
1. Log in to Plesk
Sign in to your Plesk control panel with the account that manages the hosting subscription. If you have multiple subscriptions or domains, make sure you are working in the correct one.
2. Open the Domains area
Go to Domains or Add Domain, depending on the Plesk interface layout. If the domain already exists in your subscription, you may only need to edit its hosting settings instead of creating it from scratch.
3. Add the domain name
Enter the domain you want to use for the Tomcat app. This can be:
- a primary domain, such as example.co.uk
- a subdomain, such as app.example.co.uk
- an addon-style domain if your hosting plan supports it
Choose the document root if Plesk asks for one. For Tomcat applications, the document root is often not the place where the application logic runs, but it still needs to exist because the domain must have a web hosting configuration in Plesk.
4. Set the hosting type
In the hosting settings, select the appropriate hosting type. On many setups this is standard website hosting, while the Java application itself is managed through My App Server. If your provider has enabled a specific Java or Tomcat integration, follow that workflow instead of forcing a custom setup.
For example, the domain may use Apache as the public-facing web server, with Tomcat handling the Java application behind the scenes. This is common in hosted Java environments because Apache can serve static assets, while Tomcat handles JSPs, servlets, and WAR deployments.
5. Save the domain configuration
After entering the domain name and hosting settings, save the changes. Plesk will create or update the virtual host configuration for that domain. At this point, the domain should exist in the panel even if the application is not yet deployed.
Connecting the domain to My App Server or Tomcat
After the domain exists in Plesk, the next step is to connect it to your Java service. In an ITA environment, this is usually done through the My App Server extension, which is designed for Java hosting, Tomcat hosting, JSP hosting, and servlet hosting inside a shared hosting account.
Install or select the Tomcat version
Open My App Server in Plesk and choose the Tomcat version that matches your application. Several ready-to-install Java and Tomcat versions may be available. If your app requires a different version, you may be able to upload and configure it manually, depending on the service limits and supported settings.
Choose the version carefully because the wrong Java or Tomcat release can cause startup errors, classpath issues, or deployment failures.
Assign the domain to the application server
Link the domain you created to the Tomcat instance or application server. This tells the hosting platform which hostname should be served by which Java application. In many cases, the domain will be attached to a specific application path, context root, or deployment slot.
For example:
- example.co.uk may point to the root context of a WAR application.
- app.example.co.uk may point to a staging build or a separate servlet project.
- admin.example.co.uk may be used for an internal Java dashboard.
Choose the deployment location
Select where the application files will be stored. Depending on the setup, this may be a WAR upload area, a Tomcat webapps directory, or a service-specific deployment path controlled by the My App Server extension. The goal is to make sure the domain and the application point to the same service configuration.
Confirm the service is running
Before testing the domain, verify that the Tomcat service or private JVM is running. If the service is stopped, the domain may resolve correctly but the application will not respond. Plesk service controls or the My App Server control interface should show the current state of the application server.
DNS and name resolution checks
Adding a domain in Plesk does not automatically guarantee that the public address will work immediately. The domain also needs to resolve to the correct hosting target through DNS.
Check the following:
- The domain’s nameservers are pointing to the correct DNS provider.
- The A record or CNAME record is set correctly.
- The DNS zone contains the right target for the root domain and any subdomains.
- DNS changes have had enough time to propagate.
If the domain is newly registered, it may take some time before the browser reaches the new hosting account. If the domain already existed elsewhere, make sure old DNS records are not still active.
How to use a subdomain for a Tomcat app
Many Java applications work well on a subdomain because it keeps the app separate from a main website. This is especially useful when you are hosting both a public site and a Java service in the same account.
To use a subdomain in Plesk:
- Create the subdomain in the Domains area.
- Assign the correct document root or hosting settings.
- Connect the subdomain to the Tomcat service in My App Server.
- Update DNS so the subdomain resolves to the hosting account.
A subdomain is often the cleaner choice for application testing, admin panels, and API endpoints. It also makes it easier to separate the Java app from the main web content without needing a separate hosting subscription.
Typical hosting settings to review in Plesk
When you add a domain for a Tomcat application, it is worth checking a few related settings in Plesk so the domain behaves as expected.
Hosting type
Make sure the hosting type matches your application design. If the site is mainly Java-based, the web server should be configured to pass requests correctly to Tomcat or the application service.
Document root
Even if Tomcat is handling the application, the document root still matters for files such as static assets, verification files, or fallback content. Keep the folder structure simple and consistent.
SSL/TLS
Most production domains should use HTTPS. After the domain is added, install or assign an SSL certificate so the Tomcat application can be accessed securely. If your hosting setup includes automated certificate management, use it as soon as the domain is working.
PHP or other unused handlers
If the domain is dedicated to Java, you usually do not need PHP handlers or other unrelated scripting options. Keeping the configuration focused helps reduce confusion when troubleshooting.
Deploying the Java application after adding the domain
Once the domain is active in Plesk and linked to Tomcat, deploy the application itself. Depending on your setup, you may upload a WAR file, place JSP files in the correct directory, or configure a custom application server path.
Good deployment practice includes:
- Using a clean WAR file name that matches your app.
- Checking file permissions after upload.
- Reviewing application logs after the first start.
- Testing the root URL and any required context paths.
- Confirming the Java version matches the app requirements.
For small and medium Java applications, this workflow is usually enough to get a site online quickly without the complexity of large-scale cluster management.
Common problems after adding a domain
If the domain has been added but the application does not work, the issue is often related to one of the following areas.
The domain opens a default page instead of the app
This usually means the domain is not connected to the Tomcat deployment correctly, or the app is deployed under a different context path. Check the My App Server mapping and verify the application location.
The browser shows a connection error
This can happen if DNS is still propagating, the domain points to the wrong IP address, or the hosting service is not active. Confirm the zone records and make sure the domain resolves to the correct account.
Tomcat starts but the app returns an error
Application-level errors may come from missing libraries, unsupported Java versions, wrong file permissions, or a broken WAR package. Review the service logs in Plesk and check the application startup output.
SSL certificate warning appears
If HTTPS is not configured yet, the browser will warn that the connection is not secure. Install a valid certificate for the domain and ensure the web server and Tomcat routing are serving the secure host correctly.
Old content still appears
If you previously used the domain elsewhere, cached content, stale DNS, or an old document root may be the cause. Clear browser cache, confirm DNS, and verify the hosting directory that Plesk is using.
Best practices for UK-based hosting setups
For a UK-focused hosting setup, the practical goal is usually to make the domain easy to manage, easy to remember, and ready for secure access. That means using a clean domain structure, enabling HTTPS early, and keeping the Tomcat deployment straightforward.
Recommended practices include:
- Use a clear domain or subdomain name that matches the application purpose.
- Keep the Plesk hosting settings simple unless the app needs something specific.
- Use the correct Java version from the beginning.
- Monitor logs after deployment so issues are detected early.
- Separate test and live applications when possible.
These steps are especially helpful in managed hosting environments where Plesk, Apache, and Tomcat each have a specific role. When the domain is configured cleanly, the application is easier to support and update.
FAQ
Can I add a domain in Plesk before deploying the Tomcat app?
Yes. In most cases, it is a good idea to add the domain first and then deploy the application. That way the hostname, hosting settings, and DNS can be prepared before the WAR or JSP files go live.
Do I need a separate domain for each Tomcat application?
Not always. You can use subdomains, separate context paths, or different hosting entries depending on your setup. For clarity and easier maintenance, many users prefer one domain or subdomain per application.
Can a Tomcat app run on the root domain in Plesk?
Yes, if the hosting configuration and app mapping are set correctly. The root domain can point to a Tomcat application just like a subdomain can.
What if my Plesk domain is added but the site still shows a default page?
This usually means the domain is not linked to the correct application server or the app is deployed under a different path. Check the My App Server configuration, document root, and Tomcat logs.
Does My App Server support small Java applications only?
It is intended for practical Java hosting use cases such as JSP, servlet, and small to medium Tomcat applications. It is not designed as a heavy enterprise cluster platform with advanced HA or complex orchestration features.
Can I use a custom Tomcat version?
In many setups, yes. You may be able to install a prepared version or upload a custom one if your hosting plan and service limits allow it. Always confirm compatibility with your application before switching versions.
Summary of the process
To add a domain in Plesk for a Tomcat application, create or select the domain, confirm the hosting settings, connect it to the correct Java service through My App Server, and make sure DNS and SSL are configured properly. After that, deploy the application and test the site from the browser.
For hosted Java environments, this approach gives you a practical balance between control and simplicity. You can manage the domain in Plesk, run your own Tomcat instance or private JVM, choose the Java version that fits the app, and keep the deployment process straightforward for WAR, JSP, and servlet-based projects.
If the domain is set up correctly but the application does not load, check DNS, service status, logs, and the Tomcat mapping first. In most cases, the issue is one of those four areas.