Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

My recently configured droplets are exhibiting some unnecessary redirects and I cannot figure out why.
End result should https://domain.com
So I need to rewrite www requests and non-https requests to https without the www.
Currently the opposite is happening, and adding an extra redirect which is costing about an extra 1 second.
So domain.com (307) -> https://domain.com (301) -> https://www.domain.com (200)
My NGINX server blocks looks like this:
server { server_name domain.com www.domain.com; return 301 https://$server_name$request_uri; }
server { listen 443 ssl;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
root /path/to/html;
index index.php;
server_name domain.com www.domain.com;
#additional configurations
}
Some additional information:
Any help would be greatly appreciated. This is the last roadblock to sub-second load times.
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e