Understanding the “Overwrite custom A records used for service subdomains” Option with Containerized Services
1. What Are Service Subdomains and Custom A Records?
Service Subdomains:
These are DNS entries automatically created or managed by WHM to provide access to key services, such as:
• cpanel.example.com
• webmail.example.com
• ftp.example.com (or similar default names)
Custom A Records:
An A record maps a domain or subdomain to an IP address. Custom A records are those that you manually create or adjust for specific purposes—such as redirecting traffic to a containerized service running on a nonstandard configuration or IP.
2. How WHM Manages Service Subdomain A Records
When you add or remove service subdomains, WHM can update their corresponding A records automatically. The option:
“Overwrite custom A records used for service subdomains”
…controls whether WHM will remove or overwrite any manual (custom) changes made to those records when service subdomains are modified.
•
Enabled (On):
WHM will overwrite any custom A records matching its service subdomains. This ensures that the records always align with WHM’s default configuration, which is useful if you rely on automated management.
•
Disabled (Off):
Custom A records remain intact even if WHM adds or removes service subdomains. This is ideal if you’ve purposely set up DNS entries that deviate from WHM’s defaults.
3. Detailed Examples from Your Containerized Environment
You run several services as containers on a single server. Here’s how the setting might affect each:
A. Mastodon Docker Containers
•
Setup:
Your Mastodon service runs as a Docker container (or set of containers) behind a reverse proxy. For example, you might have a subdomain like mastodon.example.com that directs traffic to the Mastodon container.
•
Custom DNS Needs:
You may have created a custom A record for mastodon.example.com that points to your server’s public IP (or to the reverse proxy IP) to ensure proper routing to the container.
•
Impact of the Setting:
• If Enabled: WHM may remove or overwrite your custom A record if it interprets mastodon.example.com as a service subdomain. This can break your routing setup for the Mastodon container.
• If Disabled: Your custom A record remains untouched, preserving your tailored configuration for the Mastodon service.
B. Cockpit Installation
•
Setup:
Cockpit is a web-based server management tool you might access via a subdomain such as cockpit.example.com. Although Cockpit is typically installed on the host system, you may have configured a custom A record to point to a dedicated management interface.
•
Custom DNS Needs:
Using your own custom A record for Cockpit ensures that you access the management interface through a trusted, personalized URL.
•
Impact of the Setting:
• If Enabled: WHM might overwrite the custom A record for cockpit.example.com if it falls under service subdomains, potentially forcing it back to a default server IP.
• If Disabled: Your manually set DNS record remains as configured, ensuring secure and consistent access to Cockpit.
C. Asterisk/Frepbx (PBX) Container Installation
•
Setup:
Your PBX service (running Asterisk/Frepbx) is containerized and installed in /home/dom/apps/pbx. It is accessed via pbx.raywonderis.me, and Nginx is used as a reverse proxy to Apache.
•
Custom DNS Needs:
The PBX subdomain likely has a custom A record set up so that traffic is correctly routed to the containerized service. This is critical for ensuring call routing and service availability.
•
Impact of the Setting:
• If Enabled: WHM may overwrite the custom A record for pbx.raywonderis.me when service subdomains are modified, which could disrupt access to your PBX container.
• If Disabled: The custom DNS configuration remains intact, maintaining proper routing through your reverse proxy setup.
D. Jellyfin Portable Installations
•
Setup:
Your Jellyfin installations are set up as portable applications within user directories:
• /home/dom/apps/jellyfin/jellyfin for media.raywonderis.me
• /home/tappedin/apps/jellyfin/jellyfin for get.tappedin.fm
•
Custom DNS Needs:
These subdomains may have custom A records that point to the specific server or container instance handling the Jellyfin service.
•
Impact of the Setting:
• If Enabled: If WHM erroneously interprets these subdomains as standard service subdomains, it might remove your custom A records, potentially breaking your Jellyfin access.
• If Disabled: Your custom records are preserved, ensuring that both media.raywonderis.me and get.tappedin.fm correctly resolve to your Jellyfin installations.
4. When to Enable or Disable the Option
Enable the Option (Set to On) When:
• You have a standard hosting setup without custom DNS requirements for your service subdomains.
• You prefer automated DNS management by WHM and are comfortable with WHM’s default configurations.
• Your services (if any) run on the same IP and do not require special routing or reverse proxy configurations.
Disable the Option (Set to Off) When:
• You use custom A records to manage traffic for containerized services (like Mastodon, Cockpit, PBX, and Jellyfin).
• Your environment is more complex, and specific services must resolve to different IP addresses or be routed through a reverse proxy.
• You require full manual control over DNS entries to ensure that service subdomains point exactly where you want them, without interference from WHM’s automated updates.
5. Final Recommendations and Best Practices
•
Review Your Environment:
Consider the specific needs of each containerized service. If you require custom routing (as is the case with your Mastodon Docker container, Cockpit, and PBX services), it is advisable to disable the “Overwrite custom A records used for service subdomains” option.
•
Verify DNS Settings Regularly:
No matter which option you choose, periodically check your DNS records to confirm that they match your intended configuration.
•
Document Your Customizations:
Keep a record of all custom A records and container configurations. This documentation will help you quickly identify any discrepancies if WHM updates occur.
•
Integration with Other Services:
As you manage various services (like Jellyfin, Mastodon, PBX, and others) through containerization on a single server, aligning your DNS settings with your overall infrastructure is key to maintaining seamless service delivery.
By understanding how this WHM option interacts with your containerized services and custom DNS configurations, you can make an informed decision that best supports your hosting environment.