<p><strong>Update:</strong> By using <code>http</code> instead of <code>https</code> in the redirect URL. Stripe is able to successfully redirect back to my website.</p>
<p>It would be nice to avoid this workaround and understand why using <code>https</code> in the redirect URL results in the request being blocked.</p>

CC BY-SA 4.0
2021-10-21T01:26:32.597Z
2021-10-21T01:26:32.597Z
Gavin
<h2>My Setup</h2>
<p>I added a stripe checkout redirect from my craft website using <strong><a href="https://i.sstatic.net/yMsTs.png" rel="nofollow noreferrer">Stripe Checkout</a></strong> so I can accept payments from customers using payments handled by stripe.</p>
<p>In simple, I use AJAX on the frontend to send a request to a controller endpoint I created via a Custom Module, that controller then handles creating a stripe checkout session which redirects the user to a Stripe Created Payment page (see screenshot below). This all works great.</p>
<h2>The Problem</h2>
<p>The problem arises after the user fills out the stripe payment form (hosted on a stripe URL) and completes payment. I configured Stripe to redirect the user back to my website <strong>BASE_URL/success.html</strong>. However, this redirect results in a <strong>403 error &quot;Request forbidden by administrative rules.&quot;</strong> (See screenshot below). However, if I simply type in <strong>BASE_URL/success.html</strong> into my browser and hit enter, the page loads as I expect. Only when the redirect comes from Stripe does the problem arise.</p>
<h2>My Question</h2>
<p>What CRAFT or PHP rules are blocking this redirect from stripe? Locally, it works perfectly, but as soon as I deploy to DEV (hosted on <strong>HYPERLANE</strong>), the 403 error occurs. I feel like I am missing some sort of permission, or redirect rule that is unique to live hosted environments, which is not enforced on my local.</p>
<p><strong>Note:</strong> This may not be isolated to Stripe redirects, it could be that any redirects to my Craft Website from external websites return this same error.</p>
<p>Thanks in advance for any help you can provide!</p>
<p><a href="https://i.sstatic.net/xA1H5.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xA1H5.png" alt="Stripe Checkout Page" /></a></p>
<p><a href="https://i.sstatic.net/yMsTs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yMsTs.png" alt="403 error on redirect from website" /></a></p>

<craft3><error><redirect><stripe>
Redirect to Craft CMS Website Results in 403 "Request forbidden by administrative rules"
# Redirect to Craft CMS Website Results in 403 "Request forbidden by administrative rules"

(Asked by: username_0 on 2021-10-20)

## My Setup

I added a stripe checkout redirect from my craft website using **[Stripe Checkout](https://i.sstatic.net/yMsTs.png)** so I can accept payments from customers using payments handled by stripe.

In simple, I use AJAX on the frontend to send a request to a controller endpoint I created via a Custom Module, that controller then handles creating a stripe checkout session which redirects the user to a Stripe Created Payment page (see screenshot below). This all works great.

## The Problem

The problem arises after the user fills out the stripe payment form (hosted on a stripe URL) and completes payment. I configured Stripe to redirect the user back to my website **BASE\_URL/success.html**. However, this redirect results in a **403 error "Request forbidden by administrative rules."** (See screenshot below). However, if I simply type in **BASE\_URL/success.html** into my browser and hit enter, the page loads as I expect. Only when the redirect comes from Stripe does the problem arise.

## My Question

What CRAFT or PHP rules are blocking this redirect from stripe? Locally, it works perfectly, but as soon as I deploy to DEV (hosted on **HYPERLANE**), the 403 error occurs. I feel like I am missing some sort of permission, or redirect rule that is unique to live hosted environments, which is not enforced on my local.

**Note:** This may not be isolated to Stripe redirects, it could be that any redirects to my Craft Website from external websites return this same error.

Thanks in advance for any help you can provide!

[![Stripe Checkout Page](https://i.sstatic.net/xA1H5.png)](https://i.sstatic.net/xA1H5.png)

[![403 error on redirect from website](https://i.sstatic.net/yMsTs.png)](https://i.sstatic.net/yMsTs.png)

**Tags:** craft3, error, redirect, stripe


---

## 1 answers

### Answer by username_0 on 2021-10-21. Score: 1

**Update:** By using `http` instead of `https` in the redirect URL. Stripe is able to successfully redirect back to my website.

It would be nice to avoid this workaround and understand why using `https` in the redirect URL results in the request being blocked.


---

