title: How to redirect to an external domain in Flask?
body: <p>I need to redirect back to an external url after completing an action in my flask application.
  The code looks like this</p>
  
  <pre><code>if form.next.data is not None:
      return redirect(form.next.data)
  </code></pre>
  
  <p>where <code>form.next.data</code> can be an absolute url for an external domain like "www.google.com". However on passing the next value as an external url, this redirect is instead redirecting to <code>http://mysitename/www.google.com</code> and failing with a 404.</p>
  
  <p>How do I specify that the redirect is to an external domain and stop Flask from appending it to my domain root?</p>