Contents
When your site appears in the browser’s default font with blue underlined links, the HTML arrived but the stylesheets did not. When the styling is there but menus, buttons and popups do nothing, the JavaScript is missing. Either way the server is working; the problem is the URL the page uses to request those files.
Find the missing file first
Press F12, open Console and reload. The usual messages:
Failed to load resource: the server responded with a status of 404 (Not Found) style.css
Refused to apply style from 'https://example.com/css/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type
Mixed Content: The page at 'https://example.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://...'
The Network tab shows the full URL the browser requested. Compare it with where the file really is in File Manager.
Causes, most likely first
1. The path does not match where the files are
- A leading slash:
href="/css/style.css"means “from the domain root”. If the site lives inpublic_html/site, the browser asks forexample.com/css/style.cssand finds nothing. Use a relative path,href="css/style.css", or include the folder name. - Paths from your computer:
C:\Users\...\style.css,file:///orhttp://localhost:5173/only work on your machine. Search your HTML for them and replace them with relative paths. - Vite and React apps in a subfolder: set
baseinvite.config.jsorhomepageinpackage.jsonand rebuild, as in blank page after deploying React.
2. Letter case in a file or folder name
The Linux server sees CSS/Style.css and css/style.css as two different files. Open the folder in File Manager and compare the name with the link in your HTML letter by letter. The simple rule: lowercase names with no spaces for every file and folder.
3. The file was never uploaded
A whole folder can be missing after an interrupted upload, or because it is in .gitignore and you deployed through Git (dist, build, or public/build in Laravel). Laravel with Vite has its own message; see Vite manifest not found.
4. The file comes back as HTML (MIME type error)
With a single-page-app rewrite rule in .htaccess, any missing file returns the contents of index.html, so the browser receives HTML instead of CSS. The rule is fine; the path is wrong, so fix cause 1. If the message names a file that does exist, open its URL directly: a 403 means wrong permissions, which should be 644 for files and 755 for folders.
5. Mixed content or a stale cached copy
- An
http://stylesheet on anhttps://page is blocked automatically. Change it tohttps://or a relative path; see mixed content warning. - If the files are right but your edits do not show, the browser or a cache is serving an old copy. Hard-reload with
Ctrl+F5, purge LiteSpeed Cache in WordPress, and purge Cloudflare too if you use it.
How to confirm it is fixed
In the Network tab, filter by CSS and then JS: every file should return 200 with type text/css or application/javascript. Then open the site on a phone over mobile data to be sure you are not seeing a saved copy.
How to avoid it
- Use lowercase file names without spaces or non-Latin characters.
- Use relative paths in static sites, and test the site from a different folder on your computer before uploading.
- Follow the steps in upload an HTML site for your first upload.
On ArabyHost
Sites run on LiteSpeed, which reads .htaccess, and a free SSL certificate is issued automatically, so keep every link https or relative. You can rename files and fix permissions in File Manager from the panel, and the Araby AI assistant reads the error log and explains why a file is refused. WordPress sites have LiteSpeed Cache available: purge it after every design change.
FAQ
It looks perfect on my computer, so why is it different on the hosting?
Windows and macOS usually treat Style.css and style.css as the same file; the Linux server does not. And paths starting with C: or localhost do not exist on the server.
I edited and re-uploaded the CSS but see no change. Why?
The browser or a cache layer is showing the old copy. Hard-reload with Ctrl+F5, purge LiteSpeed Cache if you use it, or rename the file or add ?v=2 to its URL.
What does "Refused to apply style because its MIME type is text/html" mean?
The server did not find the CSS file and sent an HTML page instead, usually a 404 page or index.html from a rewrite rule. The problem is the file's path, not its type.