When HTML works locally but not online, a file reference is almost always wrong for the web: a path to your own disk, a backslash, different upper/lower case, a file you did not upload, or an http:// resource blocked on an HTTPS page. Open the browser console (F12 → Console and Network) to see the exact failing URL, then fix the path or upload the missing file.
First, find the actual error
Open the published page, press F12 (or Cmd+Option+I on Mac) and look at two tabs:
- Console — JavaScript errors and blocked requests, in red.
- Network — reload the page; any file with status 404 is a path problem.
Then match what you see to the list below.
1. Paths that point at your computer
src="C:\Users\sam\Desktop\site\logo.png" or file:///Users/sam/… only exists on your machine. Use a path relative to the HTML file: src="logo.png" or src="images/logo.png".
2. Backslashes
images\logo.png works on Windows and fails on web servers. Always use forward slashes in HTML and CSS.
3. Upper and lower case
Logo.PNG and logo.png are the same file on Windows and macOS but different on Linux servers, which most hosts run. HTMLtoLink matches case-insensitively as a safety net; other hosts return 404. Stick to lowercase file names.
4. Files you did not upload
Uploading only index.html leaves style.css, script.js and images/ behind. Upload the whole folder or a ZIP, or make the page a single file.
5. The CSS file is relative to the wrong place
Paths inside a CSS file are relative to the CSS file, not the page. If css/style.css uses url(images/bg.jpg), the browser looks in css/images/. Write url(../images/bg.jpg).
6. Mixed content (http on https)
Every HTMLtoLink page is HTTPS. Browsers block scripts, stylesheets and iframes loaded over plain http:// on such a page. Change the URL to https://; nearly every CDN supports it.
7. JavaScript runs before the HTML exists
A script in <head> that calls document.getElementById('app') gets null, because the body has not been parsed yet. Move the script to the end of <body> or add defer.
8. Modules, imports and React without a build
import statements need <script type="module"> and full or relative URLs with extensions (./app.js, not app). JSX and bare imports like import React from 'react' need a build step — upload the built dist/ folder instead of the source.
9. API calls blocked by CORS or missing keys
A page that fetched data fine from your local dev server may be blocked online if the API does not allow requests from other origins (CORS). And an API that needs a secret key cannot safely be called from public HTML at all. Use APIs designed for browsers, or put a small backend in between.
10. You are seeing an old version
After updating, your browser or a CDN may serve a cached copy for a short time. Hard-reload with Ctrl+Shift+R (Cmd+Shift+R). On HTMLtoLink an update reaches every visitor within about a minute.
Prevent it next time
Open a ZIP or folder and find missing files, wrong case and bad paths Open the free tool
Before uploading a folder, the ZIP site checker verifies every reference against the real files; for a single document, use the HTML checker.