I have tried few things and I am unable to have my ip redirect to my domain name. I tried redirecting in my sites-available but it breaks all my permalinks. Any ideas?
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!
Much like rewrite you are doing from www.yourname.com to yourname.com, you need to set a redirect from the IP to the domain name. You can use something like:
server {
listen 80;
server_name 111.11.111.111;
return 301 $scheme://yourname.com$request_uri;
}
Yes you will have to create a new server block in the config file just to redirect/resolve IP address to domain name Works good now thanks
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.