Custom Domain Configuration
Learn how to set up a custom domain for your MCP server.
Setting up your custom domain
In this guide, you'll learn how to:
- Register your domain - Add your domain to the TRMX platform
- Verify ownership - Prove that you own the domain
- Configure DNS records - Set up the necessary DNS settings
- Link to your server - Connect your domain to your MCP server
- Manage SSL certificates - Ensure secure HTTPS connections
Overview
This guide explains how to configure a custom domain for your MCP server deployment, making it accessible through your own branded URL rather than the default TRMX subdomain.
Prerequisites
Before you begin
Make sure you have the following ready:
- A registered domain name (e.g., example.com)
- Access to your domain's DNS settings
- A deployed MCP server (see Deploy MCP Server)
- TRMX CLI installed (see Installation)
Setting Up Your Custom Domain
Step 1: Add Your Domain to TRMX
First, register your domain with the TRMX platform:
# Add your domain to your TRMX account
trmx domain add example.com
Step 2: Verify Domain Ownership
Domain Verification
Verifying domain ownership is a security measure that ensures only legitimate owners can use a domain with TRMX services. This prevents domain spoofing and protects both you and your users.
After adding your domain, you'll need to verify ownership by adding a DNS record:
- Go to your domain provider's DNS settings
- Add the TXT record provided by the TRMX CLI
- Wait for DNS propagation (can take up to 24 hours)
To check verification status:
# Check domain verification status
trmx domain verify-status example.com
Step 3: Configure DNS Records
Required DNS Records
Once verified, configure these DNS records:
Type | Name | Value | TTL |
---|---|---|---|
A | api | [TRMX-PROVIDED-IP] | 3600 |
CNAME | www | [YOUR-SERVER].trmx.ai | 3600 |
These records direct traffic from your domain to your MCP server. The IP address will be provided after verification.
Step 4: Link Domain to Your MCP Server
Finally, connect your domain to your specific MCP server:
# Link your domain to your MCP server
trmx domain link example.com --server my-mcp-server
SSL Certificate Setup
Automatic SSL
TRMX automatically provisions and manages SSL certificates for your custom domain. This ensures your API endpoints are secure and trusted by browsers and API clients.
The platform uses Let's Encrypt to provide free, auto-renewing SSL certificates. No additional steps are required.
To check certificate status:
# Check SSL certificate status
trmx domain ssl-status example.com
Troubleshooting
Common Issues
If you encounter problems with your custom domain:
- DNS propagation delays: DNS changes can take up to 24 hours to propagate globally
- Verification failures: Double-check that the exact TXT record was added correctly
- SSL errors: Ensure your DNS is correctly configured before SSL provisioning
- Domain not working: Verify that your MCP server is properly deployed and running
You can troubleshoot using these commands:
# Verify DNS propagation
dig example.com
# Check domain status
trmx domain status example.com
# Verify server deployment
trmx server status my-mcp-server
Next Steps
Enhance Your Deployment
Now that your custom domain is configured:
- Configure OAuth Authentication - Add secure user authentication
- Set up CORS for Cross-Origin Requests - Control which domains can access your API
- Implement Monitoring - Track your API usage and performance