redirect – Can’t login to WordPress admin panel after changing domain to use WordPress pages as a fallback from React


we had our WordPress page running on

But now, we’re developing new React website, which already has some of the webpages ready.
We use Vercel to host that React website.

We want React/Vercel to host specific pages (which are already developed) and serve the wordpress page as a fallback.


React already has page ready, so we want that URL to be served directly by Vercel/React.

On the other hand, React doesn’t has page ready, so we want to use WordPress’s page as a fallback. We’ve set routing in our React app and it just asks the fallback domain for the address it missess.

For that reason we’ve created subdomain which points to old WordPress webpage and redirected our main domain to Vercel. In the case, when user tries to hit, the Vercel asks WordPress under address and response with that page at

We’ve had some problems with WordPress as it tried to redirect pages to the same adress (creating redirect loop) but we manage it by adding remove_filter('template_redirect','redirect_canonical');.

But, we still have problem when trying to log in into admin panel. After accesing we’re getting redirected to Trying to log on that page doesn’t work – we’re being redirected to the same page and nothing happens.

How can I solve that issue when loging?

Also – is there a better option than turning off canonical redirects? I’m afraid of some side effects of that. The siteurl and home properties are still set to

michalsol 9 months 2022-05-15T11:15:31-05:00 0 Answers 0 views 0

Leave an answer