搭载TransIP购买域名的Plesk服务器无法配置子域名的问题求助
Hey Lennard, sorry to hear you're stuck getting your subdomains up and running on your Plesk server with TransIP domains. Let's walk through the most likely issues and fix them step by step!
首先,检查DNS记录的核心错误
I noticed you mentioned pointing your NS records directly to your Plesk server's IP address—this is a common misstep! NS (Name Server) records need to point to domain names of name servers, not raw IP addresses. Here's how to fix this based on who you want managing your DNS:
- If you want Plesk to handle DNS:
- First, you need to set up "glue records" in your TransIP control panel. Glue records map custom NS names (like
ns1.yourdomain.comandns2.yourdomain.com) to your Plesk server's public IP. - Then, update your domain's NS records in TransIP to point to these custom NS names (not the IP directly).
- First, you need to set up "glue records" in your TransIP control panel. Glue records map custom NS names (like
- If you want TransIP to keep managing DNS:
- Leave your NS records pointing to TransIP's default name servers.
- In TransIP's DNS settings for your main domain, add an A record for each subdomain (e.g.,
project1.yourdomain.com) and set its value to your Plesk server's IP.
验证Plesk端的子域名配置
Even if DNS is set up right, Plesk needs the subdomain to be properly configured:
- Go to Domains > Add Domain > Subdomain in your Plesk panel. Make sure you've created the subdomain here, selected the correct parent domain, and assigned the necessary hosting settings (like document root, PHP version, etc.).
- Check that Plesk's DNS server is running. Head to Tools & Settings > Services Management and confirm the "DNS Server" service is active.
- If Plesk manages your DNS, open the DNS zone for your parent domain in Plesk and verify that the subdomain has an A/AAAA record pointing to your server's IP (Plesk usually adds this automatically when you create the subdomain, but it's worth double-checking).
排查DNS缓存与传播问题
DNS changes don't take effect instantly—propagation can take up to 24 hours (though often faster). Your local device might also be caching old records:
- Flush your local DNS cache:
- On Windows: Run
ipconfig /flushdnsin Command Prompt. - On macOS: Run
sudo dscacheutil -flushcachein Terminal. - On Linux: Run
sudo systemd-resolve --flush-caches(depending on your distro).
- On Windows: Run
- Test the subdomain using a public DNS resolver to bypass local cache. For example, run
nslookup project1.yourdomain.com 8.8.8.8ordig project1.yourdomain.comin Terminal/Command Prompt to see if the record resolves to your server's IP.
检查防火墙与端口设置
Make sure traffic can reach your subdomains:
- In Plesk, go to Tools & Settings > Firewall > Rules and confirm that incoming traffic on ports 80 (HTTP) and 443 (HTTPS) is allowed.
- Check with your server's hosting provider to ensure they haven't blocked these ports at the network level (some VPS providers have default firewall rules that need adjusting).
正确流程总结
To get your subdomains working smoothly, follow this flow:
- Choose your DNS manager (Plesk or TransIP) and configure the records correctly as outlined above.
- Create the subdomain in Plesk with matching settings.
- Wait for DNS propagation, flush local caches, and test the subdomain.
- Verify firewall and service status if issues persist.
备注:内容来源于stack exchange,提问作者Lennard K

