Solo travel is something I would always recommend to anyone who has been wanting a different kind of experience. There's just too much you can learn out of it and every single trip writes a totally different story than how you would if you had company.
However, there is no denying that even with the present day advancements in gender equality, safety for female travellers is still an issue in most countries even in the first world ones.
One single stupid moment of letting your guards down as a female traveller could send you into a spiralling danger.
The risks should never stop you though because even if you are travelling with a group, the risks will always be there. It is all just a matter of using great common sense and research. These are also some ways that you can keep your safety while travelling solo:
Have someone receive constant updates on your whereabouts
It does not have to be a boyfriend or a girlfriend so let's not get into the argument of not having a special someone. As I have mentioned in my previous solo trip guide, it is important to inform someone of your whereabouts. You should also keep that certain someone or a group where you are heading and what time you plan to be finished at a certain spot or activity. This could be your parents, siblings, group of friends, etc. This way, they will be able to track if you've gone home for the night or if you stayed longer than planned on an activity.
Do not entertain strangers
I know tons of other travellers will tell you that the fun is in meeting new people but this is something I would not suggest at all. Personally, I think solo travel is all about really getting into the experience on your own and meeting new people is out of the equation. I have stayed in hostels in the past and quite a few times I went to the common area to grab a drink or a snack but I've never made an attempt to have a conversation with anyone else. I had conversations with locals (usually at hotel reception or security personnel) but it was only to ask about the neighborhood or a certain spot but never a casual conversation.
Also, I don't suggest you go around telling everyone in your destination that you are travelling alone.
If anyone asks, you can always say that you are travelling with a group but you're just exploring on your own for a few hours.
Book your accommodation in the safe area of the community
This is important whether it's your first solo travel or your 50th. When booking your accommodations online, there are tons of cheaper options but you have to consider the safety of the neighbourhood that the accommodation is in. You can check in Google maps and see how the community looks like or check the reviews of the accommodation listing since there's often comments on what the neighbourhood is like.
I would suggest staying out of red light districts because they're quite unsafe at most and they're really loud at night so it will be difficult to get some sleep. Make sure to also check how far the accommodation is to the nearest train or bus station/stop so you won't have to walk very far especially when coming back at nighttime.
Join tour groups in farther flung areas
During my trip to Taipei, I wanted to go to Yangmingshan which is a national park that is quite far away from the city centre. It was also inaccessible by the main train lines and is difficult to get to by bus for a tourist like me. I had the option of a less hassle private car transfers from my hostel to the park but for my security (and because it is way cheaper), I joined in a tour group that is going to the park. Taiwan is a relatively safe country but I didn't want to risk it.
If you're thinking that it is very uncomfortable joining a tour group with complete strangers, it actually does not matter because the other tourists don't really care about you so they won't disturb you at all.
Research the safety of taking cabs and private car rides in your destination
In a lot of countries, the common risk of taking cabs is that if they notice you are a tourist, they might overcharge you or take you into unsolicited tours around the city. The only country that I have not had to be scared of cabs would be Australia. I really cannot vouch for the others.
Check forums on the safety of the cabs and private car rides in your destination city even the ones you booked through an app. Read about the experiences of other tourists. You can read or ask about this on websites like TripAdvisor or Reddit. It would be much better if you know a local who has lived or living in that country as well.
Avoid packing your valuables if you are backpacking
When I am backpacking and travelling alone, the only valuables that I bring are as much as I am willing to carry on my day bag - the bag that I will bring with me while I roam around. I never leave my valuables in my hostel just so I won't have something to think about.
Stay safe and happy travels!