Hello! I know this is a topic that is covered quite a bit in these forums, but I wanted to add a bit more and as the existing threads are quite old I thought I'd start a new one rather than tacking on to something from 2010!
What I read before I went seemed to be either 'it's horrible for women alone' or 'there's nothing to worry about and you're a crap traveller if you think so'. I don't think either of these views really give the whole story, though I also want to say up front that I had a great time and plan to return. So these tips are designed to help women considering going alone to decide where on the scale of enjoyability you might find yourself, given your own comfort-levels, and to have the best time possible if you do go!
FYI I'm in my late 30s and very blond and spent 5 days by myself in Marrakesh over Xmas. I'm very experienced at travelling alone but this was my first time in Morocco. Here's what I learned:
1. You may be places where there are few women and lots of men--my main path anywhere took me through an area outside the walls where all the taxi drivers congregate to eat and particularly at night I blended in about as much as an elephant would have--and you will get stared at and you may have many, many men try to talk to you. I'm not talking about men trying to sell you stuff, which will also happen constantly, but about men commenting on your appearance, hitting on you etc. It may feel exposing and intimidating, as it did for me the first couple of days, but all statistics suggest it is not actually dangerous. I also didn't have any men follow me for long or refuse to take no for an answer. They would say something but when I didn't respond, they'd let it go. I know that is not everyone's experience, and someone younger might have gotten more persistent hassling. But what I experienced was consistent--every day lots of men would make these kind of comments--but not persistent, in that they gave up pretty quickly if I just kept walking.
2. The more conservatively you dress, the less hassle you get. I definitely got less attention when I was wearing less western-looking clothes, I think I just blended in a bit more. It's true that you do see western clothing on Morrocan women, but I wouldn't say they are the majority. Best attire was long loose skirts and a blouse-type top or a vest with a long loose light cardi and a scarf. It is actually more comfortable to keep the sun off your skin anyway. Bring some reasonably sturdy shoes--it's really uneven ground lot of places.
3. Walk as briskly as you can. Looking like you know where you're going is everything in Marrakesh, which is ironic considering that it is the most confusing place I've ever been! But seriously, the more I marched along with purpose the more I was left alone. If you pause anywhere in the souks, you'll get someone coming up to you trying to help you and they will expect to be paid. Try to check your phone/map a bit out of the way where you'll attract less attention. But I never found saying no made problems.
4. Stay in a riad not a western hotel. The riads are beautiful, affordable (there's a scale of course), serve food, usually have roof terraces, include breakfast, etc. They are also much more personal in that they give you *tons* of help. They can organise tours, the women at mine took me practically by the hand to the local hammam and loaned me all the stuff I'd need that one doesn't travel with (a bucket, a mat to sit on), etc. They told me what I should expect to pay for stuff I wanted to buy, gave me directions, etc. Oh, and don't forget to tip them when you leave!
5. Organise an airport pickup ahead of time through your riad rather than just getting a taxi from the airport. They will have their own regular drivers they use who will know exactly where the place is. It isn't much more expensive than a regular taxi either.
6. Consider doing some tours as a way to spend some time out and about where you will experience less hassle. I did an evening food tour, which was incredible and introduced me to some stuff I wouldn't have found on my own, and also a guided tour of the medina, with a super knowledgeable guide.
7. Go to a local hammam! Your riad will be able to tell you where the one is in your neighborhood. Mine had no sign/name/anything. It's of course women only and though I was definitely the afternoon's entertainment for the women there--the crazy western woman who didn't know how to scrub herself properly--everyone was very sweet and it was a great experience. One of my favourite things I did. If you want something a bit more upscale/less local, you can also go to one of the more westernised ones that are more spa-like.
8. If you like to drink alcohol, you may want to pick up something from the duty free to have in the riad. Most places do not serve booze and those that do are often more touristy and with worse food. One exception is Cafe Arabe, which has a goregous roof terrance and a full bar. It is very touristy but I also found it a really pleasant place to hang out, with excellent wifi! My riad did not serve alcohol but had no problem with me bringing my own to enjoy there. If you are the kind of person who expects a drink on vacation, you'll do better bringing something along than wandering the town looking for places with booze, especially as you may find you get more attention on the street at night. I definitely did.
9. Men do seem to get used to you being there, at least if they have some time. The local guys who hung out on the corner near my riad at night yelled stuff at me the first couple of nights, but by the end they were just saying 'bon soir' politely.
10, Plan down time. I loved Marrakesh but it is one of the most stimulating places I've ever been, between the mopeds speeding past and the constant talking at you by men etc. Retreat to the nearest roof terrace for some mint tea when you feel yourself getting overloaded.