Can the Host header be defined on a redirect?

Hi, due to some redirection issues on the target website, I would like to set the Host header with a different subdomain than the one we’re actually connecting to. Exactly what you would do with:

curl -v -H "Host:"

I’ve tried setting it in the redirection rule but it doesn’t seem to work according to the server logs:

  from = "/*"
  to = ""
  status = 200
  force = false # COMMENT: ensure that we always redirect
  headers = {X-From = "Netlify", Host = ""}

Can you please help me understand if this is just totally unsupported or if there’s any other way I could do it?

Thank you!

Do you mean like this? :slight_smile:

That said, we don’t support proxying to us, just an FYI. :+1:

Thanks for the reply @Pieparker. If I understand correctly, I can use the _headers to adjust the response headers from Netlify. In this case, I’m not looking to set response headers. Instead, I would like the proxied request to include a different Host request header. That is, the HTTP connection is established using the resolved IP from, but the Host header will be
Btw, the proxied request is not to a Netlify host but to another server we have with an old implementation of the website :slight_smile:

Like this: