Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

netlify.toml and _headers do not work for Netlify hosting

  • #6319
    Avatar photo[anonymous]

    I was trying to increase the cache time via Netlify’s Custom Headers.

    I tried both with netlify.toml and _headers files and uploaded them in the root directory via the File manager.

    I confirmed that the custom header caching code is right via Netlify’s playground.

    But either of these files don’t seem to have been uploaded to the site root as I can’t access them via their URL or if they have been uploaded and I can’t access them via the browser, they still don’t seem to be working. Because no custom caching header seems to have been added to the site. I can’t access the site via ftp to check as netlify does not support ftp.

    So what am I doing wrong? Why are they not working? Netlify says they should be in the site root. Is Publii not uploading either of these two files even if I upload them to the file manager? Thanks in advance.

    #6328
    Avatar photo[anonymous]

    Hi,

    I suppose that the files are uploaded properly but Netlify do not allow access them – I have made a simple test – I have create a catalog with index.html and _headers file – created ZIP from it and uploaded to netlify.

    The _headers file shows Page Not Found and in my opinion it is a correct behaviour because such files shouldn’t be publicly available (like .htaccess files on Apache servers).