Add MP3 Files To Websites

6 Simple Steps

Woman using computer
Add MP3 Files to Your Website. Morsa Images / Getty Images
Was this page helpful?

Do you have some music in an MP3 file that you think your readers would like to hear? Did you get permission to add a link to an MP3 file on your website? This is how you add the MP3 file to your website so your readers can open it or download it.

Make Sure MP3 Files Are Allowed

Some hosting services don't allow files over a certain size and some don't allow you to have certain types of files on your website, this includes MP3 files.

Make sure that what you are about to add to your website is allowed by your Web hosting service first. You don't want to get your website shut down for not following the rules or do a lot of work getting ready to add the MP3 file to your website to find out you can't. Don't use copyrighted music, it could get you in trouble.

If your hosting service does not allow you to have MP3 files on your website you can get your own domain name for your website or switch to another hosting service that does allow MP3 files or large files on websites.

Upload MP3 File To Your Website

Upload your MP3 files to your website using the easy file upload program that your Web hosting service provides. If they don't provide one then you need to use an FTP program to upload your MP3 file to your website.

Find Your MP3 File's Address (URL)

Where did you upload the MP3 file to? Did you add the MP3 file to the main folder on your website or to another folder?

Or, did you create a new folder on your website just for MP3 files? Find the address of the MP3 file on your website so you can link to it.

Choose a Location For Your MP3 File

Which page on your Web site, and where on the page, do you want the link to your MP3 file to be? You could make the MP3 file open when the Web page opens, but a lot of people find this annoying and some find it to be bad form.

So you should decide where you want the link to the MP3 file to show on the Web page.

Find The Location of the MP3 File in Your HTML

Look through the code on your Web page until you find the spot where you want to add the link to your MP3 file. You may want to add <p> before you enter the code, for the link to your MP3 file, to add a space.

Add The Link to the MP3 File

Add the code to the place where you want the link to the MP3 file to show up in your HTML code. It's actually the same link code that you would use for a normal Web page link. You can make the text for the MP3 file link say anything you want it too. For example:

  • Your website is hosted at Freeservers
  • The username for your website is "sunny"
  • Your website is located at http://sunny.freeservers.com
  • You uploaded the MP3 file to the main directory in your file manager on your website
  • The MP3 file is called "flowers.MP3"
  • The text you want the reader to click on to download the MP3 file is "Click here for the MP3 file called flowers."
  • Your code will look like this:

    <a href="http://sunny.freeservers.com/flowers.MP3">Click here for the MP3 file called flowers.</a>

  • If you had uploaded the MP3 file to a folder called "fun", the code for the link to the MP3 file would look like this instead:

    <a href ="http://sunny.freeservers.com/fun/flowers.MP3">Click here for the MP3 file called flowers.</a>

    Testing The MP3 File Link

    If you are creating your website on your computer, before downloading the MP3 file to your server, test the link to the MP3 file to make sure it works right by linking to the MP3 file on your hard drive like this:

    • The MP3 file is located in the "My Documents" folder
    • It is called "flowers.MP3"
    • The text for the MP3 file says "Click here for the MP3 file called flowers."
    • Code is: <a href ="file:///C|/My Documents\flowers.MP3">Click here for the MP3 file called flowers.</a>