My website has a redirect page with the format https://my.site/redirect?deeplink=https://foo.bar&...
The redirect is implemented in Javascript, so when you request the site, you get a 200 and some HTML + JS, not a 30X.
I recently started to notice that someone is abusing the redirect page for dubious links (guns, viagra, ...). It was suspicious that the traffic of the page increased by a lot, especially at night, when there should be barely any traffic.
I started to log the requests including referer. The referers seem to be all kinds of different hosts (not the same one every time) but mostly redirect pages themselves. Examples are
- http://foo1.bar/cgi/mt4/mt4i.cgi?cat=12&mode=redirect&ref_eid=3231&url=http://my.site/redirect...
- http://foo2.bar/modules/wordpress/wp-ktai.php?view=redir&url=http://my.site/redirect...
- http://www.foo3.bar/core.php?p=books&l=en&do=show&tag=2774&id=20536&backlink=http://my.site/redirect...
- http://www.google.sk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=172&ved=0CCMQFjABOKoB&url=http://my.site/redirect...
I'm actually in control of the URLs that users should be legitimately redirected to, so I implemented a whitelist of valid hosts and started redirecting invalid ones to my start page.
What I'm wondering is, why should someone abuse my redirect page in the described way? And are there any risks I should be aware of?