Web2lead redirects to a page which makes you click

After submitting a Web2Lead form which has the following code:

<input type="hidden" value="thanks.html" id="retURL" name="retURL">

I’m taken to a page which asks me to click before going to that page, instead of simply redirecting straight to that page. (Screenshot below)

How do I skip the click and redirect straight away?

enter image description here

Answer

After much searching, I found the answer. If the return URL is on a different domain to the current domain, it will ask the user to click first:

The redirect page is being displayed due to some security measures
that Salesforce has in place with our web to lead infrastructure. In
cases when a GET method is utilized and the referring URL (as
specified in HTTP headers) cannot be matched to the return URL,
Salesforce will introduce a new page notifying the Leads that they are
being redirected to a different URL. This will allow them to take the
necessary action to cancel that redirect. The workaround for this is
to change the GET method to POST or use HTTP headers to specify the
retURL.

https://success.salesforce.com/answers#!/feedtype=SINGLE_QUESTION_DETAIL&id=90630000000gmagAAA

Attribution
Source : Link , Question Author : Rich , Answer Author : Rich

Leave a Comment