Forward domain via Cloudflare

Usually shared hosting panels have simple parking, forwarding tools. But when it is about cloud/dedicated servers – most things should be done manually or throught DNS manager.

For example, if you want to forward to, you can create website in your server, and then you can forward it to by using webserver redirect command or just with code (php, javascript, python etc.)

But it is not good way just because needs creating some unneeded codes, instances.

Cloudflare rules allow you to create beautiful smart rules for your web traffix. One of them is forwarder.

Once you added your new domain to Cloudflare, choose that domain, just open PAGE RULES tab and do the steps below:

  1. Click to “create page rule button” and enter your domain name with /* endfix
  2. Click to Add a Setting link, and choose Forwarding URL option.
  3. Check 301 option as a redirect status. (or 302, if you aware what it is)
  4. Click to Save And Deploy button.

That’s all. Now you have got simple rule for forwarding – without doing any coding.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.