Music in your Blog. ~ The Blog Doctor.

Music in your Blog.

New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates. Thanks for Visiting!

Background music in blogs and websites is not appreciated by many viewers since it disturbs attention, gathers unwanted attention and wastes bandwidth. However there are many methods to do this and many websites catering to this demand......

The first requirement is to have your music file ready and upload it to a freehost like Googlepages. If you can't create an account at Googlepages create a group at Google Groups and this gives you 100 MB free space for files. Next upload your file to the freehost and copy down its link or URL.

The simplest solution is to use the embed tag to put the file in your page. Login to Dashboard and go to Layouts. This opens the Page Elements tab in which click on Add Page Element in the sidebar. Choose the Html/Javascript option and paste this code under contents :

<EMBED src="LINK OF SOUND FILE AT FREE HOST" autostart=true loop=false volume=100 hidden=true><NOEMBED><BGSOUND src="NAME OF FILE"></NOEMBED>

Replace the CAPS in above code and Save. When you put autostart=true then the file will start playing as soon as the page is loaded. You can put "FALSE" instead of "TRUE" so the person visiting your page will have to click on the play button for it to start. Loop=true makes the file to play again and again. Use this for small files like birdsongs which can continuously play in the background.


Upload your MP3 file in the same way as above. Then open Notepad and type in :

This is the link to your uploaded MP3 file at Googlepages. Save this file as Mysong.m3u and upload this file as well to Googlepages. Login to your Dashboard and select Layouts which opens the Page Elements tab. Click Add Page Element in sidebar and select Html/Javascript option and paste the following code under contents :

<EMBED src="Mysong.m3u" autostart=true hidden=true>

Save. You can also use Google Gadgets to put a MP3 player in your blog as shown in Add Google gadgets to blog.


For playing MP3 Playlists you require Flash MP3 Players. You can find these by Googling for them. Some are available at sites like loudfusion, playpause or jeroenwijering
Download one of these and upload them to your Googlepages account. Copy down the link to the flash player file.

Next upload all your songs to a freehost like Googlepages and copy down their URLs. After that open Notepad and paste their links as shown below :

<?xml version="1.0" encoding="UTF-8"?>
<player showDisplay="yes" showPlaylist="yes" autoStart="random">
<song path="LINK TO MP3 FILE 1" title="FILE1 TITLE" />
<song path="LINK TO MP3 FILE 2" title="FILE2 TITLE" />
<song path="LINK TO MP3 FILE 3" title="FILE3 TITLE" />
<song path="LINK TO MP3 FILE 4" title="FILE4 TITLE" />
<song path="LINK TO MP3 FILE 5" title="FILE5 TITLE" />
<song path="LINK TO MP3 FILE 6" title="FILE6 TITLE" />
<song path="LINK TO MP3 FILE 7" title="FILE7 TITLE" />

Save this file as MyPlaylist.xml and upload it to your Googlepages account. Copy down the link to the file. Login to dashboard and click on Layouts. This will open the Page Elements tab in which click on Add Page Element and choose Html/Javascript option. Paste the following code under contents and save :

<embed pluginspage="" width="230" src="LINK TO FLASH PLAYER FILE" height="280"
flashvars="playlist=LINK OF YOUR MYPLAYLIST.XML AT GOOGLEPAGES&autostart=true"/></embed>

Save the changes. Refresh cache and view blog.

Technorati Tags:, , ,


Vierothcka said...

You could also have given the coding for the visible and non autostart version, so that viewers can choose if they wish to hear the music or not, i.e.
<embed src="url of music file" autostart="false" hidden="false">


vin said...

Thanks Vierothcka

May I draw your attention to the paragraph directly above the "MP3 Files Heading!

phillies58 said...

could you help with coding to play more than one file. One after another, i.e. playlist?

thanks, appreciatte the help thus far!

vin said...

When you create the XML file as shown in the post above you are in effect creating a playlist.

Bev said...

I was trying to add a song, followed the directions, uploaded to googlepages and copied your code in. Then you say "CHANGE THE CAPS" but I don't know what to change them to.

Help please

vin said...

What code are you talking about? There are several snippets where you have to change the caps. For detailed help use my email address in the left column.

adit said...

i've visited this blog many times but this is the first time i'm using the comment thread,i have a photoblog and i wanted to know if it's a good idea to add a radio widget ,what do you recommend?

vin said...


It depends on many factors :

Would your visitors like to hear radio while browsing your site?

What type of music does the radio play? Can visitors tune to different stations?

Many people do not like sudden music to play when a site is loaded as other members of their family may want silence at that point. Hence putting music in your blog is said to decrease traffic.

Does the radio have no autoplay function?

Anonymous said...

If you're after free music tracks for use in blogs, podcasts etc.. as background music then give this site a go:

Free Music Tracks

Loads of music tracks which are free to use

Wild On Mono! said...

Great blog! Even though my blog is actually for really restricted use -only three authorized readers, haha- it's great to know can do all this stuff. And HOW to do it, of course.

Thanks a lot, you've made love all this Google universe even more, :)

Cheers from Chile!

adit said...

Well ,i don't know but i am using the radio widget and that has a stop autoplay function and i can customize it to any particular genre i want[but you already knew that].

The thing is that on some of the blogs that i contribute to, the administrator has come in for a lot of flak for using a radio widget as it does not correspond to everbody's taste and frankly one genre can't appeal to anyone.

One more question-if i have a question on a particular topic should i post it on the post corresponding to the topic or any question on any topic on this blog is okay?

vin said...


In the interest of continuity it is advisable to post a question under the post being commented on otherwise viewers lose the context when reading comments. You can also email me : the address is in the middle column.

adit said...

thanks Mr.Vin-i will do exactly that,and i'm guessing that you're Indian so Happy Independence Day.

vin said...

Same to you Adit! :-)

ConfideInMe said...

i did ALL the instructions on how to put music on the background but it still doesn't play when i open my blog. and whenever i edit the page elemnt, i find out that the codes that i made were no longer the same. some help pleaseeee... what am i doing wrong?

vin said...


Put the code in a blog post or Html page element. What error message are you getting? How does the code change?

Englandboi said...

Oioi, Vin

Just a quick question for ya. Is it possible to drag and drop a music file from an mp3 player into the blog?


onecoatsam said...

I uploaded a wma music file to googlepages and added a page element to my blog (which is at My question is how to I get the uploaded file from Googlepages to the blog.



vin said...


Not at the present moment. You may have to wait until Web 4.0 comes along! :-)

vin said...


Paste the following code in a Html page element :

<embed src="LINK_OF_WMA_FILE" width="320" height="283" autostart="1" showcontrols="1" type="application/x-mplayer2" pluginspage=""> </embed>

Replace the CAPS with the link of your file at Googlepages.

z0z0 said...


I've been having a problem with the links I'm posting to mp3s. I have them hosted on a site called, and whenever I click on the links to the mp3s, I'm just taken to the site. Essentially, what I'd like to do is just have each individual mp3 load and play in a new window as people read my blog. For some reason, the linked images from have no problem coming up, but I'm redirected to whenever I click on the mp3 links.

My blog is here:

The first link to an mp3 is in the "U" of the word "Uoy" underneath the phrase "The prudish need not proceed" on the right of the page.

Any idea what might be happening?

Vin said...


Have a look at :

Put Streaming Audio MP3 In Blog

nitmails said...

A very good piece of information, I appreciate it.

Anonymous said...

hey there, thanx u 4 the tips..:D..

全佑, Quanyou said...

Thank you so much! I finally put some music on my blog! However when i use Firefox to view the music wun play, only works with IE. lol any tips?

Vin said...

全佑, Quanyou,

What method did you use? What file format? Try clearing the cache. See :

Clear the Cache.

全佑, Quanyou said...

Hi!!! I used the googlepage method and also the mysong.m3u to upload the music. Then i copy ur code on this site to my elements page. The file is a mp3 format.

Aprilyn said...

Maybe I'm just dumb but I still don't get it. I'm having trouble knowing what to change the caps to so I can get the right code. I'm so confused. Also, what if I want to make a playlist of MY favorite songs? These are songs not found on the sites like project playlist. My favorite is one my younger sister wrote and recorded. Can I make a playlist off songs on my computer? Please help me. I'm so lost.

Vin said...


First upload the music files to a free host and copy their links.

Vin said...

全佑, Quanyou,

Where is it? Is it in a post or in the sidebar?

Your blog loads a bit slowly! You might try to speed up blog loading time.

Vidur said...

Fantastic info. Thank you so much!! it worked for me!- Kunwar Vidur Singh Kushwaha. Do visit me

Aprilyn said...

OK. This is still not working right. I got an account on Googlepages. I uploaded my music, made a playlist as you described, downloaded a google gadget, got it to show up on my blog but it says "Error loading playlist". I also tried a different MP3 player and while it worked, it made the song sound like it was sung by the Chipmunks on speed.

Vin said...


After making the playlist file, upload it to Googlepages and copy down it's link.

Then paste the link of the file in the EMBED code given at the end of the above post.

Then paste the code in a Html page element.

Paulina said...

I wanted to include a song in just one of my posts, kind of something people can click the play button and listen to only if they wanted and only when they are reading that particular post. I also don't want them to be able to download it because it is of a friend's band singing and shouldn't be free I don't think. Any advise would be nice.

Vin said...


Try :

mrs.h said...

When you say 'paste this code under contents' does it matter where? It seems to be be divided into sections like variable definitions, header, outer-wrapper, etc. Does the code need to be in a particular place or will at the beginning work?

Vin said...


This is the sentence which comes before :

"Login to Dashboard and go to Layouts. This opens the Page Elements tab in which click on Add Page Element in the sidebar. Choose the Html/Javascript option and ...."

....paste the code under Contents.

That is to say "paste the code in the Content text box which appears in the Html/Javascript popup window.

Super Kawaii Mama said...

Hi Vin,
I'm wondering if these instructions also apply if i just want to add music to an individual post. Is it a simple matter of generate html code from a hosting site and post in the body of the post? Or do you have another recommendation?

Vin said...

Super Kawaii Mama,

Try :

Eddie said...

Simple problem w/o a solution. I've tried the embedded WM player on my blog's HTML/JavaScript, and the WMP does appear on the page. But, does not play.

embed width="300" autostart="false" loop="true" src=" CABINET/MYSONG.mp3?attredirects=0" height="40"/embed (without <> for this viewing purpose)

As you can see MYSONG (all caps replaced) is hosted on google.sites. The link is good, and when clicked/addressed by itself in IE it responds with the option of saving or opening the file. I've tried every scenario, dropping the "?attredirects=0", changing the hierarchy of directory direct to the filecabinet (and subsequent link); tried as an attachment instead, changed the "https" to "http."

This is driving me crazy on a simple embedded player, which in the past should have worked. Did google.sites change something? What's wrong?

Vin said...


Try the streaming audio method and see if it works?

Eddie said...

Thank-you for the expedient response Vin, you're a real champion! The process worked! I'm keeping it in my archives for other site pages. However, I'm looking for a subtle background (autoplay) in the main page where the user has control to increase volume. Have read allot about flash players, do these things work between a (host) and Blog? Before spending time with it, can you recommend a source? Sincerest grats, and thanks again for your knowledge...

Vin said...


Check out the flash sites mentioned in above post.

  said...

How do you upload the files to google pages>>>>>>>>>>>>>>>>>>>>>>>
Please tell me

Vin said...

  ,

Have a look at How to Upload files to freehosting?

music industry careers said...

thanks for sharing this information...i got trouble embedding music to my blog...i should try this...

webdesign said...

Great player thanks!

Troy said...

I used the code above to add one of my own mp3's to my blog (file hosted at It worked great, but I do prefer the music to not play automatically. I changed the code to [autostart="false"]. While that kept the music from playing, I could not see a play button anywhere. I also changed [hidden] to [="false"] and that didn't help either.

What should I do to make a play button appear so that a reader can listen at his/her option? Thanks!

Vin said...


Use a Flash Player. Also see Music in Blogs.

Nancy said...

Okay, I put a song on my googlegroup, cut and pasted the first code, replaced the caps, and it's still not working. Here's a question (I'm a technaphobe), do I keep or lose the quotes? Could it be that my googlegroup and blog are restricted? Please help!

Vin said...


Can you send me the code you used by email? The address is in the middle column.

sarath said...

i tried the code that u gave:The first code which is simple.
i added my files at,
but there is a problem.if it has to play we have to download quicktime!
this is a big problem as many users dont have quicktime

Vin said...


Change file format at

sarath said...

i had uploaded an mp3 i need to convert it!
which format should i conver it

Vin said...


In Windows Explorer go to Tools----->Folder Options----->File Types. Scroll down in Registered File Types box and click MP3 extension.

In Details for MP3 extension box below click the 'Change' button for 'Opens With' and choose the application to associate with MP3 files.

xsHaHbUdAkM1sTeRix said...

can i add some mouse sound??? by clicking??

Vin said...


If you have the sound file use the method in the above post.

Cabri said...


The first code has some problem, anyone found a way to fix this?

I have it playing in firefox perfectly, but in IE it just doesn't play the sound.


Susan said...

great tutorial, I like it

iklan said...

what a great


Skip to top of post.

Search Blog Before Commenting


Post a Comment

Please use the above search box to search this blog before posting your valuable comments.

Comments posted on Dummies Guide to Google Blogger (Beta) are moderated and will be approved only if they are on-topic and not abusive. Try not to include website URLs/links in your comments. You can email me : drbhatns at gmail dot com for any blogging question. Thanks,


The Blog Doctor The Blog Doctor2 Blog Doctor Home


Tips On Blogger and Latest News.

Skip to top of post.