Singer/songwriter Ed Sheeran has written a song about a real life girlfriend cheating on him with a pal.

The A Team hitmaker blasts a former lover in a track called Don't, and he has confirmed it is based on a true story, sparking speculation among fans that the girl in question is fellow British pop star Ellie Goulding.

The song contains several lyrics about a cheating female, and the line "We make money the same way - you were looking for a lover to burn" has fuelled the Goulding rumour as it is thought to be a reference to her 2013 single Burn.

Sheeran tells Billboard magazine, "The story in Don't is 100 per cent true. I could have gotten nastier - there was more s**t that I didn't put in.

"I was seeing someone for a bit, and then they ended up physically involved with one of my friends in the same hotel that we were staying in, while I was downstairs. And I feel like: Treat people how you want to be treated.

"If I show courtesy and respect to someone, I expect to receive it. When we're in the same hotel, and I'm downstairs at my party and you're upstairs doing that, that's disrespectful."

Sheeran goes on to issue a stark warning to his future girlfriends, adding, "If you date a songwriter, be prepared to have songs written about you. If you do nice things, you'll have nice songs. And if you do f**ked up things, you'll get a horrible song."