We will learn today how we can redirect a domain to another using Cloudflare (301 redirection). This way, we avoid content duplication and Google SEO indexes correctly.
First, we enter Cloudflare and select the domain we want to redirect.
NOW we are going to Rules and select Page Rules.
And now we create a new rule, by clicking on Create Page Rule.

In If the URL matches (the required field):
Put exactly this: *.tudominio.com/*
O if you need only to redirect for example www. -> put this: www.tudominio.com/*
Add Redirect:
Vamos a Then the settings are: Pick a Setting (required)
Select Forwarding URL
Permanent Redirect
And in Destination URL is placed:
https://dominiodestino.es/$1
Click on Save and Deploy
