What causes porn redirects on the Web?

So I was surfing a site I often read, via my iPad though Safari. All of the sudden, I see a weird URL, which then redirects to a hardcore porn site.

This is the first time it’s ever happened to me, especially since I normally use Firefox with NoScript and Adblock Plus. I’m unaware of iOS viruses, and as I said, this is a site I visit often.

Could an ad be to blame? Should I inform the webmasters of this site? I don’t think I tapped something I usually wouldn’t, but given this was on an iPad, I can’t be certain (and no, this site usually doesn’t/shouldn’t serve up porn ads).

After the iOS 6 update on my iPhone this happened to me regularly on the Dope. Very annoying, but it stopped after a week or so, so the web masters must have done something about it. I would also really like to know what could have caused that.

On Firefox, there’s an option under Advanced -> General -> Accessibility to make the browser ask before redirecting you to another page. Is there something like that for Safari?

Not that I can see, sadly.

It is not at all clear what you are saying happened. Where did you “see” the “weird URL”? Had you clicked something?

It’s almost always Javascript. It could be an ad network or a hacked web site - both are common.

If you PM me the URL you were on when it happened I might be able to tell which it was.

If it’s a hacked web site the best thing to do is contact the web host and ask them to alert their customer.

Well, it’s certainly got nothing to do with the SDMB ad servers, if that’s what you were wondering.

cough