Safari adds “localhost” in front of all URLs, why?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Safari adds “localhost” in front of all URLs, why?



First, a disclaimer: The nature of this problem forces me to publish an affiliate link (to a german fashion shop) here. This is NOT a shady attempt to trick people into using the shop behind, I just need advice in a serious URL breaking problem. The link is classic affiliate, NOT pay-by-click or so. Hope this is clear :)



My problem: I'm using affiliate links on a project which I get directly from certain online shops. The links always work fine in all browsers, except safari.



Example link: https://partners.webmasterplan.com/click.asp?ref=839072&site=7270&type=text&tnb=74&diurl=//www.mirapodo.de/converse-essentials-winterwool-jogginghose-herren-anthrazit-8519541.html



Leads to the correct site in all browsers EXCEPT Safari mobile (iOS 11 and 12) and Safari on macOS High Sierra, which route the browser to: http://localhost//www.mirapodo.de/converse-essentials-winterwool-jogginghose-herren-anthrazit-8519541.html?ref=839072&affmt=2&affmn=74 (note the localhost in front of the URL). As this is not a valid link, Safari will cancel the request and give an internal error page.



My suggestion:
The tracking link contains ... url=//www.mirapodo.de/ ... which looks suspicious. The links are hardcoded, directly by the shops, I cannot change them and didn't touched them in any way. I'm using nginx, Laravel, a domain with SSL/https, totally standard settings.


... url=//www.mirapodo.de/ ...



My question: Why is this happening, and how can I fix it ?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard