Question about http to https redirects

This may be splitting hairs, but I have a client request.

If a user enters into their browser, there are a couple rounds of requests (result of running curl -v -L):

301 Moved Permanently 
Issue another request to this URL: '`

then later,

Issue another request to this URL: ''

They would like to go directly to

I believe I can accomplish this in my _redirects file with:* 301!

This does indeed make the initial request to the https://www

I just want to make sure that I’m not missing anything here, about this process or otherwise.

I tested on a test domain and it appears to work.

1 Like

The easiest way I can think of is using Netlify DNS for your custom domain:

More info here:

Thanks very much, @tomrutgers. However, that doesn’t get me what I’m trying to accomplish. The default setting, whether or not you’re using Netlify DNS, is two redirects, and I want to get it to one.

I think what I want to accomplish is pretty straightforward; I just want to make sure—before I put this in production—that there are no gotchas that I’m unaware of.

Hi @budparr, your redirect is good and won’t cause any problems. Thanks for sharing :slightly_smiling_face:

1 Like