Redirects do not behave as expected


Let’s start with a bit of context, I have created a statically generated blog that we want to display as a subfolder of our website hosted elsewhere. (

I am not very experimented on this subject but I understood that I needed to deploy the blog on the main domain and proxy requests that are meant for the website from Netlify.

Here are the redirects rules that I added to netlify.toml

    from = "/blog*"
    to = "/blog:splat"
    status = 200
    force = false

    from = "/*"
    to = ""
    status = 200
    force = true
    headers = {X-From = "Netlify", X-Forwarded-Host = ""}

However, when I tried accessing the base route ( after that, netlify responded with a 301 redirect instead of a 200 proxy.

age: 32
content-length: 178
content-type: text/html
date: Wed, 10 Jun 2020 13:36:33 GMT
server: Netlify
status: 301
x-content-type-options: nosniff
x-nf-request-id: 35132e8a-bef8-4da2-896b-cbae76fec0ee-3441662

I have tried redeploying and clearing my local cache and the cache of Netlify

EDIT: The weird thing is that the redirects work as intended on my netlify subdomain

Does anyone know what could be the issue here?

Hi, @jeremy.b, the 301 redirect is coming from the site being proxied to:

$ curl -svo /dev/null  2>&1 | tail -n 12
< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Thu, 11 Jun 2020 07:56:40 GMT
< Content-Type: text/html
< Content-Length: 178
< Connection: keep-alive
< Location:
< X-Content-Type-Options: nosniff
{ [178 bytes data]
* Connection #0 to host left intact
* Closing connection 0

This happens because you are proxying to the HTTP (not the HTTPS) url:

    to = ""

If you change that to the HTTPS version, it should return a 200 response:

    to = ""

If there are other questions, we’ll be happy to answer.

Hi @luke,

This solves my problem, thanks for your answer.