I’ve followed a tutorial post about redirect on Digital Ocean’s community.
But things didn’t worked for me as in the tutorial.
Below is my server block code for redirect from config file /etc/nginx/conf.d/redirect.conf :
server {
server_name www.crusadehimalaya.com;
return 301 $scheme://crusadehimalaya.com$request_uri;
}
I’ve also added A record with **“www” ** and @
Running ```curl -I http://www.crusadehimalaya.com
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 194 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0 HTTP/1.1 301 Moved Permanently Server: nginx/1.14.0 (Ubuntu) Date: Tue, 04 Dec 2018 07:45:15 GMT Content-Type: text/html Content-Length: 194 Connection: keep-alive Location: http://crusadehimalaya.com/
Running ```curl -I http://crusadehimalaya.com```
Gives following output:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0curl: (6) Could not resolve host: crusadehimalaya.com
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!
It’s most likely due to a DNS propagation issue. I’m getting good output now. So perhaps the issue you were facing subsided as propagation completed.
Cheers
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.