Using Custom Database URLs
Elevate your project's professionalism by using your own custom domain for your database connection. Instead of the default AgenticSQL URL, your application can connect to an address like postgres.my-saas.com. This guide explains the simple, one-time setup process.
The Concept: DNS CNAME Records
This feature works by using a standard DNS record called a CNAME (Canonical Name). You are not moving the database; you are simply creating a custom, branded alias that points to your database's real address on our infrastructure. The entire process is handled by your own DNS provider (like GoDaddy, Cloudflare, or Namecheap) and incurs no extra cost from AgenticSQL.
Configuration in 3 Steps
Follow these steps to point your custom domain to your AgenticSQL database.
Get Your AgenticSQL Target URL
First, you need the original connection URL provided by AgenticSQL. This is your "target".
- 1.Navigate to your AgenticSQL Dashboard
- 2.Find the database you want to customize and copy its Hostname
- 3.It will look something like this:
your-project.db.agenticsql.ai
Go to Your DNS Provider
- 1.Log in to the service where you manage your domain's DNS records (e.g., GoDaddy, Cloudflare, Namecheap)
- 2.Find the section for managing DNS records for your domain (e.g.,
my-saas.com)
Create a New CNAME Record
Create a new DNS record with the following settings:
| Field | Value |
|---|---|
| Type | CNAME |
| Host (or Name) | postgres (or db, analytics, etc.)This becomes the subdomain: postgres.my-saas.com |
| Value (or Target) | Paste the AgenticSQL Hostname from Step 1 Example: your-project.db.agenticsql.ai |
| TTL | Leave at default (usually "Auto" or "1 hour") |
Important: Save your new DNS record. DNS changes can take anywhere from a few minutes to several hours to propagate across the internet.
Final Step: Update Your Connection String
Once your DNS has propagated, you can update your application's DATABASE_URL environment variable. Simply replace the original AgenticSQL hostname with your new custom domain. All other parts of the connection string (username, password, port, database name) remain the same.
Before:
postgres://user:pass@your-project.db.agenticsql.ai:5432/dbnameAfter:
postgres://user:pass@postgres.my-saas.com:5432/dbnameWhy Use Custom URLs?
Professional Branding
Your database connection reflects your brand, not ours. Perfect for client-facing applications and enterprise deployments.
Future Flexibility
If you ever need to migrate providers, you can update the CNAME target without changing your application code.
Zero Performance Impact
DNS resolution happens once and is cached. There's no latency penalty for using a custom domain.
Standard & Secure
CNAME records are a standard DNS feature used by every major platform. Your connection remains fully encrypted.
Your Database, Your Brand
Custom database URLs are a simple but powerful way to maintain your brand identity throughout your entire stack. This is infrastructure that respects your professionalism. This is AgenticSQL.