How to redirect (301) URL with port number to another URL

Hi all,

I’d like to setup a permanent redirect that contains a port number. Does anyone know the best way to achieve that? I tried to apply page rules but that didn’t work. Or maybe I’m doing something wrong :wink:

This is what I want to achieve:

http(s)://domain.com:2199/*

redirect to:

http(s)://domain.com/abcdefg (so without a port number)

Any help is very appreciated!

AFAIK, Cloudflare doesn’t allow you to open custom ports unless you have the Enterprise plan (which includes Spectrum will all TCP/UDP ports). This article shows which ports are compatible with Cloudflare:

You’ll need to grey out (:orange::grey:) your domain to be able to use that port, and then configure your webserver to make the redirect. However, this will leave your site unprotected, so it isn’t a good solution and I wouldn’t recomend it.

Hope it helps!

2 Likes

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