"Do it by yourself."

"Do it yourself."

Do both carry about the same meaning?

When do you drop "by"?

If I tell you to do it "by yourself," I probably mean that you should do it alone.
If I say, "do it yourself," I am excluding myself from the process, but that wouldn't keep you from finding someone to help you.
yourself: without help
by yourself : without help OR alone; when others are not with you

If you want the meaning alone, you need by. Context also plays a role.

I did it myself. (without help)
I did it by myself. (without help)
I did it while I was by myself. (while I was alone) (Note that another clue to meaning is a temporal expression like while.)

Only the version with by allows the intensifier all.
*He built the table all himself.

He built the table himself. (without help)

He built the table all by himself. (completely without help)
Our son was sick and stayed home from school today. The poor kid had to play all by himself today. (completely alone; it's not likely that a child needs help to play!)

-- I need to buy a few things in this shop. Do you want to come in with me?
-- No. I'll just stay in the car by myself and wait for you. (Note how context tells us it's alone; it's not likely I need help to stay and wait.) (by myself is completely unnecessary here, of course. I used it only as an illustration.)

-- OK. I won't be long.
In the plural, the meaning alone isn't quite literally true, of course. by ourselves (just us; no other people)
Students: We have free audio pronunciation exercises.
I understand what you mean. Thanks, Philip.
 CalifJim's reply was promoted to an answer.
Site Hint: Check out our list of pronunciation videos.
CalifJimyourself: without help

by yourself : without help OR alone; when others are not with you

Thanks, CJ.

Got it!