On this page
What this issue is
Every response from your server carries a Content-Type header. It names the file type, for example text/html for a web page, text/css for styles or application/pdf for a PDF. The browser trusts this label to decide what to do.
When the label is wrong, the browser does the wrong thing. A page labelled application/octet-stream is saved as a file. A page labelled text/plain shows its raw HTML. Scripts and stylesheets with the wrong type may be blocked, especially when the server also sends X-Content-Type-Options: nosniff.
Why it costs you leads or sales
A visitor who clicks your ad and gets a file download sees no offer, no form and no checkout. Most will leave at once. Ad spend is still charged for the click.
- Ad clickVisitor reaches your URL
- Server responseContent-Type: application/octet-stream
- Page rendersBrowser downloads a file instead
- Form or checkoutNever seen
- ConversionNever tracked
The page is served with the wrong type, so nothing after it happens.
Example: illustrative numbers for a page that gets the same traffic before and during the fault.
How to check if your site has it
Look at the response headers for your key pages: landing pages, thank-you pages, checkout and any URL without a file extension.
Run curl
In a terminal, run curl -I https://example.com/your-page and read the Content-Type line. A normal page shows text/html; charset=UTF-8.
Use browser dev tools
Open DevTools, go to the Network tab, reload, click the first request and look under Response Headers.
Test other browsers and devices
Some faults appear only through a CDN edge, on mobile, or on one URL pattern. Try a private window too.
Check assets as well
Look at your CSS and JavaScript files. A wrong type there can break styling or scripts even when the page opens.
curl -sI https://example.com/landing | grep -i -E 'content-type|x-content-type-options'| Content-Type sent | What the visitor sees |
|---|---|
| text/html; charset=UTF-8 | Page renders normally |
| text/plain | Raw HTML code shown as text |
| application/octet-stream | File download prompt |
| application/json or other | Data or a download, not a page |
| Missing header | Browser guesses; results vary |
How to fix it
Find which layer sets the wrong type: the origin server, the app, or a CDN or proxy in front. Compare the headers from the origin and from the public URL if you can reach both.
Check for stray output and headers
Deactivate plugins, especially caching, security and redirect plugins, and switch to a default theme to see if the type corrects itself. Search the theme and plugins for header('Content-Type' calls.
Review .htaccess
Remove any AddType or ForceType lines that apply to PHP or HTML. Regenerate rules by saving Settings > Permalinks.
Check custom templates
Shopify sets text/html for pages. If a custom template, app proxy or alternate template outputs JSON or plain text, change its Content-Type back or remove the template assignment.
Check apps and proxies
If the URL is served by an app proxy, contact the app developer, because the header comes from their server.
Check the container script
GTM does not set page headers. If the gtm.js file loads with a wrong type, the cause is a proxy or server-side setup in front of it. Check the custom loader domain settings.
Check hosting and proxy
Webflow serves the correct type. If you use a reverse proxy or CDN in front of Webflow, review its rules for response header overrides and content-type rewrites.
Check custom domain and proxy
If funnel pages download, review any Cloudflare or proxy rules on your custom domain and temporarily set the record to DNS only to compare. Contact support if the fault remains.
Check connected domain setup
Wix manages headers. If you proxy the domain through another CDN, remove header-rewriting rules there. Otherwise contact Wix support with a curl -I output.
Check domain and code injection
Squarespace sets the header itself. Review any proxy in front of the site, and check that custom URL mappings do not point to a file or download link.
Set the header in your app
Send the correct type before any output. In PHP use header('Content-Type: text/html; charset=UTF-8'); at the top of the script.
Fix the server defaults
Apache: set AddType text/html .html and AddDefaultCharset UTF-8. Nginx: make sure include mime.types; is in the http block and default_type is text/html or application/octet-stream only for unknown files.
Fix extensionless URLs
Check rewrite rules so pages without an extension reach your app, which then sets the type, instead of a raw file handler.
http {
include mime.types;
default_type application/octet-stream;
charset utf-8;
}AddDefaultCharset UTF-8
AddType text/html .html .htm
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch><?php
header('Content-Type: text/html; charset=UTF-8');
?>How to confirm it's fixed
- curl -I shows Content-Type: text/html; charset=UTF-8 for every key page
- The page renders in Chrome, Safari and Firefox, on desktop and mobile
- CSS and JavaScript files load with text/css and a JavaScript type
- The CDN cache has been purged and the public URL matches the origin
- A test form submission or checkout reaches the thank-you page
How to prevent it happening again
- Re-check headers after server, PHP, CDN or hosting changes
- Keep server MIME type files up to date after upgrades
- Review proxy and CDN rules before publishing them
- Test new landing page templates and redirects in a private window
- Monitor key pages on a schedule instead of relying on manual spot checks
Wrong header
- Content-Type: application/octet-stream
- Browser offers a file download
- No form or checkout is visible
Correct header
- Content-Type: text/html; charset=UTF-8
- Page renders as normal
- Form and checkout are usable
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor opens your funnel pages in a real browser on a schedule, from the EU or the US. If a page downloads or does not render, the journey step fails, so the check catches it. A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.
Questions people ask
Why does my website download a file instead of opening?
The server is probably sending the wrong Content-Type header, such as application/octet-stream, so the browser saves the page instead of rendering it. Check the header with curl -I and fix the server, app or CDN rule that sets it.
What Content-Type should an HTML page use?
Use text/html; charset=UTF-8. This tells the browser to render the response as a web page and read it as UTF-8 text.
Why does my page show raw HTML code?
The response is most likely labelled text/plain, or a script is outputting the page with the wrong header. Set the type to text/html and check for plugins, proxies or rules that override it.
How do I check the Content-Type header of a page?
Run curl -I followed by the URL and read the Content-Type line. You can also open browser DevTools, choose the Network tab, reload and look at Response Headers on the first request.
Can nosniff cause a page or script to stop working?
Yes. With X-Content-Type-Options: nosniff, browsers will not guess the file type. A script or stylesheet with the wrong type is blocked, so fix the type rather than removing the header.
Why does the page work on the origin but download through my CDN?
A CDN rule may rewrite the header, or the CDN may have cached a response with the wrong type. Review response header and transform rules, then purge the cache.
Can a wrong content-type affect my ad conversions?
Yes. If visitors get a download instead of your page, they cannot see the offer or reach the form, and conversion tags never fire. The ad click is still charged.
Related issues
- OPS-095Compression (gzip/brotli) disabledFix guide
- OPS-096HTTP/2 or HTTP/3 not enabledFix guide
- OPS-092Hosting migration left old server serving some trafficFix guide
- OPS-085Debug mode on in production (stack traces)Fix guide
- OPS-079Server software outdated (Apache/Nginx/IIS CVEs)Fix guide
- OPS-094Rate limiting on host blocks normal visitorsFix guide