For a JSP migration, the safest time to change DNS is usually after the new Java application has been fully tested on the target hosting account and is ready to receive live traffic. In practice, that means you should not update the DNS record as soon as the files are uploaded. First verify that the JSP site runs correctly on the new Tomcat or private JVM, confirm the expected domain binding in Plesk, and make sure the application responds properly through the new hosting platform before you cut over traffic.
If you are moving a JSP application to a managed hosting environment with My App Server, the DNS change should be the last step in the go-live process. This reduces downtime, avoids broken sessions, and gives you a rollback path if something unexpected appears after launch.
When to change DNS for a JSP migration
The right moment to change DNS depends on three things:
- the new JSP application is installed and working on the destination server;
- the domain is already configured in the control panel and points to the correct application stack;
- you have lowered the DNS TTL in advance so the switch propagates faster.
As a general rule, change DNS only when the migrated JSP site is ready for public traffic. If the app still needs code fixes, database updates, or Tomcat configuration changes, keep the old DNS active until those issues are resolved.
For JSP hosting, the cutover is especially important because the application is not just static content. It often depends on:
- Tomcat context configuration;
- Java version compatibility;
- WAR deployment structure;
- database connectivity;
- session handling and application-specific routes.
If any of these are not confirmed on the new hosting account, changing DNS too early can make the migration visible to users before the service is stable.
Best practice: test first, switch last
The most reliable DNS cutover strategy is:
- prepare the new hosting environment;
- deploy the JSP application to the new Tomcat instance or private JVM;
- test the application using a temporary hostname, preview URL, or local hosts file;
- reduce the DNS TTL on the old zone before cutover;
- update DNS only after validation is complete;
- monitor traffic, logs, and application health after the switch.
This approach works well in hosted Java environments where you control the application through Plesk and a custom service such as My App Server. It gives you a clean separation between deployment and go-live.
What to verify before changing DNS
Before you point the domain to the new JSP hosting platform, verify the following items:
1. The application starts correctly
Confirm that Tomcat starts without errors and that the JSP pages render as expected. If you use a private JVM or a dedicated app server instance within a shared hosting account, check the service status in the control panel and ensure it remains stable after restart.
2. The domain is mapped correctly
The domain must be assigned to the correct document root, proxy rule, or application endpoint in Plesk. If the domain still points to an old folder or a default web root, DNS changes alone will not make the site work.
3. SSL is ready
If the production site uses HTTPS, install or renew the certificate before cutover. DNS changes can happen at the same time as SSL preparation, but the certificate must already be valid for the domain on the new host. Otherwise, users may see browser warnings immediately after the switch.
4. Database access is tested
Many JSP applications rely on JDBC connections. Make sure connection strings, credentials, and firewall rules are correct on the new platform. A page may open, but key functions can fail if the database is not reachable.
5. Environment-specific settings are updated
Review any configuration files, environment variables, external API endpoints, upload paths, and file permissions. These are common migration issues for JSP and servlet applications.
6. Caching and sessions are understood
If the application uses in-memory sessions, users may lose active sessions during cutover. Plan the switch during lower traffic periods where possible, or prepare a maintenance window if the application cannot tolerate session resets.
How DNS timing affects JSP migration downtime
DNS changes do not usually switch every visitor at the exact same moment. Each resolver caches records according to the TTL value. That means some users may reach the old server for a while, while others reach the new one sooner.
For a JSP migration, this can create a mixed state where:
- some users see the old application;
- some users see the new application;
- sessions or submitted forms may behave differently if the two environments are not synchronized.
To reduce this risk, lower the TTL in advance, ideally 24 to 48 hours before cutover. A common approach is to set TTL to a short value such as 300 seconds, depending on your DNS provider and operational preferences.
Shorter TTL helps traffic move to the new hosting platform more quickly after you update the records. However, it does not remove the need to keep the old environment available during propagation.
Recommended cutover sequence for a JSP site
For most JSP hosting migrations, the cleanest sequence is:
- Set up the target account, Tomcat version, and Java version.
- Upload the application and verify WAR deployment or JSP file access.
- Confirm the app works through the new hostname or temporary URL.
- Lower the DNS TTL on the current domain records.
- Freeze content changes if the site is not designed for live synchronization.
- Update A, AAAA, or CNAME records to the new destination.
- Check the application through the live domain.
- Monitor access logs, error logs, and service status.
- Keep the old hosting account active until DNS propagation is complete.
If your hosting setup uses My App Server, this process can be managed from the control panel together with the application service itself. That makes it easier to verify whether the Tomcat instance is healthy before and after the DNS switch.
Which DNS record should you change?
In a JSP migration, the DNS change usually affects one or more of the following records:
- A record — points the domain to a new IPv4 address;
- AAAA record — points the domain to a new IPv6 address, if used;
- CNAME record — points a host name such as
wwwto another host name; - MX record — usually changed only if email also moves to a new service;
- TXT record — sometimes needed for SPF, DKIM, or domain verification.
For a web-only migration, the critical records are usually the A and AAAA records for the domain and the www subdomain. If email is hosted elsewhere, keep MX and related records unchanged unless you are also moving mail.
Do not change DNS records you do not need to change. A focused cutover reduces the chance of accidental downtime.
How to prepare DNS before a JSP migration
Good preparation can make the final switch much smoother. A practical pre-cutover checklist looks like this:
- copy the application to the new host;
- match the Java runtime version to the application’s requirements;
- set up Apache Tomcat or the private JVM instance;
- test JSP pages, servlets, file uploads, and form submission;
- configure the domain in the hosting panel;
- install SSL for the production domain;
- lower TTL on relevant DNS records;
- confirm rollback steps in case a quick revert is needed.
In managed hosting environments, it is also useful to review service control options so you know how to restart Tomcat or check the service if something goes wrong after DNS changes.
Common mistakes when changing DNS for JSP hosting
These are the most frequent errors during a JSP migration:
Changing DNS before the app is tested
This is the most common problem. If the application is not verified on the new server, users may encounter broken pages or incomplete functions immediately after the cutover.
Forgetting about Tomcat context paths
JSP applications often depend on a specific context path, such as /app or /portal. If the new deployment uses a different path, the site may appear to be down even though Tomcat is running.
Ignoring Java version differences
A JSP application that runs on one Java version may fail on another due to deprecated APIs, encoding issues, or library incompatibilities. Always test on the target runtime before changing DNS.
Not lowering TTL in advance
If TTL remains high, some visitors may continue to reach the old host for hours or longer. This makes troubleshooting harder and can lead to inconsistent user experience.
Not leaving the old server online long enough
After DNS is updated, keep the old environment available until you are confident that propagation has completed and no important traffic remains there.
Switching web DNS but forgetting related services
If the application uses external callbacks, API integrations, webhooks, or mail settings tied to the domain, review them as part of the migration plan.
How My App Server fits into the migration process
In an ITA-style Java hosting setup, My App Server gives you practical control over the Java application environment inside a shared hosting account. That is useful during DNS cutover because you can prepare and validate the destination service before the domain is pointed to it.
Typical migration benefits include:
- control over Apache Tomcat service start, stop, and restart;
- selection of available Java versions;
- support for WAR, JSP, and servlet deployment;
- a private JVM or isolated app server instance;
- control panel visibility for basic service management.
This model is especially suitable for small and medium JSP applications that need a manageable hosting environment without the complexity of enterprise cluster administration. It is not aimed at heavy distributed architectures, but it is very practical for standard JSP hosting and routine DNS go-live changes.
Example DNS cutover scenario
Here is a simple example of the recommended timing:
- Monday: deploy the JSP application to the new hosting account and test it through a temporary URL.
- Tuesday: lower the DNS TTL on the current live domain.
- Wednesday: verify SSL, database, and application logs on the new environment.
- Thursday evening: change the A record for the domain and
wwwsubdomain to the new server. - Friday: monitor traffic, fix any late issues, and keep the old server online until propagation is complete.
This sequence gives enough time to find environment-related problems before users are sent to the new server.
What to do if the migration is not ready on cutover day
If testing reveals a problem shortly before the planned DNS change, do not rush the cutover. It is usually better to delay by a few hours or a day than to expose users to a broken JSP application.
In that case:
- keep the current DNS active;
- fix the issue on the new host;
- retest the application through the temporary host name;
- only switch DNS after validation passes again.
This is one of the main reasons to separate deployment from DNS change. The DNS record should reflect a service that is already stable, not one that is still being tuned.
FAQ
Should I change DNS before or after uploading the JSP application?
After. Upload and test the application first. DNS should be changed only when the new Tomcat or private JVM environment is ready for production traffic.
How long before cutover should I lower TTL?
Usually 24 to 48 hours before the planned DNS switch. That gives time for cached records to expire faster after the update.
Can I change DNS while users are active on the old JSP site?
Yes, but expect a transition period where some users still reach the old server. If the application has login sessions or frequently updated data, plan the cutover carefully to avoid inconsistencies.
Do I need to change email DNS records during a JSP migration?
Not usually. If only the web application is moving, keep MX and mail-related records unchanged unless your email service is also moving.
How do I know the new JSP site is ready for DNS cutover?
You should be able to open the site on the new host, verify Tomcat service status, test key pages and forms, confirm database connectivity, and make sure SSL is active for the live domain.
What if the site uses a different Java version on the new server?
Test it carefully before the DNS change. Java and Tomcat version differences can affect compilation, libraries, and runtime behavior.
Can I roll back by changing DNS again?
Yes, but rollback is not instant because DNS caching still applies. That is why lowering TTL before the migration is important.
Conclusion
The best time to change DNS for a JSP migration is after the new application is fully tested and ready to serve live traffic. In a hosting environment with Plesk and My App Server, that means your Tomcat or private JVM instance should already be running correctly, SSL should be in place, and the domain should be mapped to the right application path before you update the records.
For the smoothest cutover, lower TTL in advance, verify the new environment, switch the DNS last, and keep the old hosting active until propagation is complete. This approach minimizes downtime and gives you a safer go-live for JSP, servlet, and Tomcat-based applications.