Custom Domains
FluxLink allows you to use your own custom domains for your dynamic links instead of the default domain. This gives you a branded experience for your users and more control over your links.
Setting Up Custom Domains
1. Add a Domain in Settings
- Log in to your FluxLink dashboard
- Navigate to the Settings page
- In the Custom Domains section, enter your domain name (e.g.,
links.yourdomain.com) - Choose a verification method:
- DNS TXT Record (recommended): Verify ownership by adding a TXT record to your domain's DNS settings
- File Upload: Upload a verification file to your web server
- Click Add Domain
2. Verify Domain Ownership
After adding the domain, you'll need to verify that you own it:
DNS TXT Record Verification
- In your domain registrar or DNS provider, add a TXT record with:
- Host/Name: Your domain (e.g.,
links.yourdomain.com) - Type: TXT
- Value: The verification token provided by FluxLink (e.g.,
fluxlink-verify=xyzABC123) - TTL: 3600 (or as recommended by your provider)
- Host/Name: Your domain (e.g.,
- Return to the FluxLink dashboard
- Click Verify Domain next to your domain
- If successful, the status will change to "Verified"
File Upload Verification
- Create a text file at the following URL on your domain:
https://your-domain.com/.well-known/fluxlink-verification.txt - Add the verification token provided by FluxLink as the only content in this file
- Return to the FluxLink dashboard
- Click Verify Domain next to your domain
- If successful, the status will change to "Verified"
3. DNS Configuration
After verifying your domain ownership, you need to configure your DNS to direct traffic to your FluxLink instance:
CNAME Record (Recommended)
Add a CNAME record in your DNS settings:
- Host/Name: Your subdomain (e.g.,
linksforlinks.yourdomain.com) - Type: CNAME
- Value/Target: The domain where your FluxLink instance is hosted
- TTL: 3600 (or as recommended by your provider)
A Record (Alternative)
Alternatively, you can use an A record:
- Host/Name: Your subdomain (e.g.,
links) - Type: A
- Value: The IP address of your FluxLink server
- TTL: 3600
4. Web Server Configuration
Configure your web server to handle requests to your custom domain:
For Nginx
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:4000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}For Apache
<VirtualHost *:80>
ServerName your-domain.com
ProxyPreserveHost On
ProxyPass / http://localhost:4000/
ProxyPassReverse / http://localhost:4000/
</VirtualHost>5. SSL Configuration (For HTTPS)
To secure your custom domain with HTTPS:
- Use Let's Encrypt to generate a free certificate:
certbot --nginx -d your-domain.com - Or enable SSL through your service provider (Cloudflare, etc.)
6. Testing Your Custom Domain
- Ensure DNS propagation is complete (may take up to 24-48 hours)
- Try accessing your domain with HTTP first before testing HTTPS
- Create a new link with your custom domain and test it on various platforms
Using Custom Domains in Links
Once your domain is verified and properly configured:
- When creating a new link, select your verified domain from the "Custom Domain" dropdown
- The link will be generated using your custom domain instead of the default domain
- Share the link with your users
Troubleshooting
If your custom domain isn't working:
- DNS Issues: Verify your DNS records are set up correctly and have propagated
- Verification Status: Ensure your domain is showing as "Verified" in FluxLink
- Web Server Configuration: Check your Nginx/Apache configuration
- SSL Certificate: Ensure SSL is properly configured for HTTPS links
- Firewall Settings: Make sure your server's firewall allows traffic on ports 80 and 443
Limitations
- You can only use domains that you have verified
- The domain must be properly configured with the correct DNS records
- HTTPS requires a valid SSL certificate for your domain