Unable to get forwarding rule to work

I have a Synology NAS that I want to be able to connect to with my own domain.

I have 1 page rule setup that works fine, it forwards from my own subdomain to the URL for the Synology NAS.

This works fine, and have no issues with it. I then wanted to setup the login portal for the Synology Drive server. It can simply be made into an allias by adding a /drive to the end of the other forwarded URL

If I put the URL just on it’s own it works fine, but if I try to use my forwarding rule, I get an error: We can’t connect to the server at #####

I know it’s something with Cloudflare since the direct link works. Any ideas? The only difference between the two rules is a different subdomain and the forwarded URL has /drive added on.

Can you post the forward rules or a screenshot? Sounds like the wildcard handling is missing.

The blanked out parts are just my Synology/Cloudflare ID

Here’s the DNS entries that were created automatically when I made the page rules:

CNAME nas ####.synology.me

I created this one because I thought maybe it was the problem but it didn’t do anything:
CNAME drive ####.synology.me

For rule #1, you need to direct from *drive.example.com/* to mynas.synology.me:5001/drive/$2

(The first * matches http or https, and the second * matches the path, $2 copies the stuff matched by the second * wildcard).

Also ensure you have a DNS record for drive.example.com, use dummy values of A or AAAA 100:: and set it to be proxied.

Repeat for rule #2.

1 Like

Sweet! Worked! Didn’t need to touch the DNS records, but adding the * and $2 worked for the drive redirect.


If you have dns records for drive already that will do, Cloudflare’s pipeline just needs them to pick up the request. They will never be used though so it’s a little safer to use a dummy value in case the page redirect gets deleted or as a reminder that those records are only there for redirects.

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