Redirect root to www -- tutorial not working for me

Hey all – i’ve got a total n00b question. Trying to use @domjh’s great tutorial on redirecting root to www: but getting an error on : Image 2021-10-04 at 2.58.03 PM " Error establishing a database connection"

I just want to redirect to

I’ve got this dummy A record set up: Image 2021-10-04 at 2.59.56 PM

and this page rule: Image 2021-10-04 at 2.59.28 PM

what am I doing wrong?!

BTW @erictung wondering if you might have some expertise here? Saw you posted on some related posts.

It’s not polite to ping people out of the blue.

That error is not related to the redirect issue. It’s quite possible you’ve configured your database to connect to a hostname that is now :orange: Proxied. Database configs should either use localhost (if it’s on the same machine), a :grey: DNS Only Hostname, or the origin IP address of the database server.

Apologies on the ping!

I don’t control the end destination – it’s a SaaS platform that I’m white-labeling.

The confusing thing was that the tutorial says "This can point to any IP address as the redirection page rule will execute first. " … but it seems like, based on your response, that that might not be the case here? It’s not even getting to the redirect rule?

(which would make sense because when i turn the rule off, i still get the same db error)

is there another approach I should be taking to make root redirect to www?

That’s correct. But database connections are not the same as a website redirect.

Your database configuration can not point to an :orange: Proxied hostname.

The main issue here is the database connection. Can you get the provider to point it to something other than the root domain name?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.