I have deployed my server on ubunto-20x, tested it with IP address and was working fine.
Then i added the domain name (from namecheap), added ns1, ns2, ns3.digitalocean.com to namecheap NameSpaces, and setup-ed the @ and www referring to the droplet in my domain
setup-ed ufw to allow only http and https access
Then setup-ed SSL certificate using Let’s Encrypt and Certbot.
Now i am getting “Invalid Host header” on result when i use https://www.mydomain.co, Although it is working when i use https://xxx.xxx.x.x (my droplet IP)
what could be wrong ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @ahmedmohsenafifi,
This could be due to a host check on your application level. What is the framework that you are using?
You might have to add your new domain name to the allowed hosts or disable the host check from your application, but this would depend on the framework.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.