← All posts

Font-face works offline but not online

I have been working on a website project for University, and ran into a problem. My font-face files worked perfectly locally, on my computer, but when uploaded to my server, the font-face wouldn’t work. Additionally, when the URL to the file (which had uploaded successfully, and visible in cPanel) was typed in, it gave a 404 not found error.

Eventually I found the problem was with file permissions – the font-face files and folder had uploaded fine, but with the wrong permissions. I fixed it by changing all the permissions in cPanel to 755 – so that everyone (not just a user) could read and execute them. Screenshot:


The font-face files then worked. Other problems and solutions I came across were having full-stops (.), capital letters or other punctuation in the filename, and actually getting the filename right in the CSS file (making sure the URL to the files was correct).

More to read

See all

Comments

Loading comments…

Not published. Required for moderation.