HTML5 Video works locally, but not on the server


HTML5 Video plays correctly on your local copy of a site you’re building, but once you upload it to a server, it breaks.


This can happen if the server sends the video back with the wrong MIME-Type, usually text/plain or something similar. What you need to have the server send the correct MIME-Type. If you’re using Apache, add these lines to your .htaccess or server configuration file:

AddType video/ogg .ogv
AddType video/mp4 .mp4

One thought on “HTML5 Video works locally, but not on the server”

Leave a Reply

Your email address will not be published. Required fields are marked *