title: Redirecting user to external site
body: <p>I want to redirect a user to an external site, outside of my ASP.NET MVC application, through a simple anchor tag. The tricky part is, the user can enter the link himself.</p>
  
  <p><code>&lt;a href="@model.Url"&gt;up up and away!&lt;/a&gt;</code></p>
  
  <p>If the user enters: <code>www.google.com</code> in a field (bad user), he is being redirected to <code>http://www.example.com/page/www.google.com</code>.
  which is totally understandable, he should use <code>http://</code> in front of his link... </p>
  
  <p>It works as expected if I hardcode the <code>http://</code>in front of the link like so: <code>&lt;a href="http://@model.Url"&gt;up up and away!&lt;/a&gt;</code></p>
  
  <p>BUT if the user was to enter <code>http://www.google.com</code> (good user), the browser redirects to <code>http://http//www.google.com</code> which goes nowhere..</p>
  
  <p><strong>So now the question:</strong> Is there a helper or method or something that routes to an external site no matter if the link contains <code>http://</code>or not? Something like <code>@Url.ExternalLink(model.Url)</code> would be great.
  I could write this myself, but no need to reinvent the wheel, right? So if the wheel exists, please provide the wheel! Thanks in advance!</p>
  
  <p>Checked a bunch of links, but they didn't satisfy my needs of the variable user input (never trust a user!):
  <a href="https://stackoverflow.com/questions/23094174/how-to-properly-encode-links-to-external-url-in-mvc-razor">How to properly encode links to external URL in MVC Razor</a> , 
  <a href="https://stackoverflow.com/questions/32220691/redirect-to-external-url-from-onactionexecuting">Redirect to external url from OnActionExecuting?</a> , 
  <a href="https://stackoverflow.com/questions/7156760/why-does-response-redirect-not-redirect-external-url">Why does Response.Redirect not redirect external URL?</a> , 
  <a href="https://stackoverflow.com/questions/2381949/url-action-open-link-in-new-window-on-asp-net-mvc-page">url.Action open link in new window on ASP.NET MVC Page</a> , ...</p>