Page Rule Forwarding URL Doesn't Work

Hello,

I am trying to setup Page Rules to forward my domain to an url, but it seems to doesn’t work.

In DNS I have only 2 MX records for my custom mail. Am I missing something or do I need a webhosting for this to work?

Thanks!

You will need a DNS record for the required hostnames.

So if I understand correctly, I need to add this?

1 Like

Yes that’s right.

You’ll also need one for www and any other hostnames you want to match in the rules.

1 Like

Yes, so exact process with www, instead of @ → www, but what about https://?

DNS doesn’t care about the protocol (http or https), you just need one for each subdomain.

Okay, so that’s it then?

It takes some time to apply, or?

Yep, will only take a couple of minutes. If your local DNS cache has the old result cached then it can take longer.

Thank you very much, it works, but it redirects to disc***rd com, without / after it. :thinking:

It redirects to the right place, then https://discord.gg/F4jqRJ9HCT/ sends it to discord.com.

Oh, I realized what’s that happening, no worries.

Thank you once again and have a great day/night!

1 Like

Just for reference if you are only using the domain for this redirect you can make just one rule that will achieve this matching *example.com/* but what you have does work.

Okay, thanks for letting me know. I replaced https://discord.gg/F4jqRJ9HCT/ with https://discord.com/invite/F4jqRJ9HCT/, hope it will work.

For now it redirects only to https://discord.com/ for some reason, I guess I will need to wait.

Yeah it seems to work OK now, if you’re seeing the old redirect it’s probably cached as you did set a 301 permanent redirect.

If you test it with www, it works also? :thinking:

Yes.

>>> https://www.epic-central.eu

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Date:	Wed, 04 Jan 2023 22:20:42 GMT
Connection:	close
Cache-Control:	max-age=3600
Expires:	Wed, 04 Jan 2023 23:20:42 GMT
Location:	https://discord.com/invite/F4jqRJ9HCT/
Report-To:	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=R%2BgMvguM40MUba9zzEZpUUbygzDUpfRPac92PwC6OJjV8wuxMRZCzwYS6aXBZndaEwuFMf8Eu71J1W%2B4NIpivIlqArdMmP00EpeEbXi06VFjWriBNDe72NsAnEs18O29IF%2FGUS1S"}],"group":"cf-nel","max_age":604800}
NEL:	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server:	cloudflare
CF-RAY:	78475cec6d2a997b-FRA
alt-svc:	h3=":443"; ma=86400, h3-29=":443"; ma=86400




>>> https://discord.com/invite/F4jqRJ9HCT/

> --------------------------------------------
> 200 OK
> --------------------------------------------

Status:	200 OK
Code:	200
Date:	Wed, 04 Jan 2023 22:20:42 GMT
Content-Type:	text/html
Connection:	close
CF-Ray:	78475cec98f190a2-FRA
Accept-Ranges:	bytes
Cache-Control:	private
Last-Modified:	Wed, 04 Jan 2023 20:41:54 GMT
Set-Cookie:	__cfruid=f01c993e5566b7e6ab9113530f81027c910adec0-1672870842; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None
Strict-Transport-Security:	max-age=31536000; includeSubDomains; preload
CF-Cache-Status:	HIT
Permissions-Policy:	interest-cohort=()
X-Build-Id:	15bdaf088b4e1a759726f65b2abdafa7b909104c
X-Content-Type-Options:	nosniff
X-Frame-Options:	DENY
X-Robots-Tag:	noindex, nofollow, noarchive, nocache, noimageindex, noodp
X-XSS-Protection:	1; mode=block
Report-To:	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=HUiaWEz424n6qdKSwXNGcqSuA%2BClIXM4yMMg1lfIaG4ewqd6SihPmhnHpZ2tvzG38ROdML0%2BIr95rDWlUSOOhOP6zhQV1dc7QgSK9n%2Bost5mfd7DEXIwj6OV7Dlm"}],"group":"cf-nel","max_age":604800}
NEL:	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server:	cloudflare
alt-svc:	h3=":443"; ma=86400, h3-29=":443"; ma=86400

Cool, thanks!

Have a great day/night!

1 Like

Oh, one last thing, is it also possible to redirect from example epic-central.eu/… to some url?

You mean a subdomain like something.epic-central.eu or epic-central.eu/something? Yes you can set a page rule for that and use wildcards * to match multiple URLs. If you do it for a subdomain you’ll also need to add another DNS record like you did the others.