Here is an outline of steps involved in fixing up your subdomain redirect.
- After signing in to Cloudflare, click on the add site button to add your domain. Ensure you change your name servers in your original Domain platform to that of cloudflare.
2. Then click on DNS so as to set your DNS records.
You’ll need to set your A record and CNAME record.
3. Set the name of your A value to blog as in blog.example.com or whatever blog represents in your subdomain.
Set the IPV4 address to 192.0.2.1. This is a default ip address that does not point to any server. It’s most appropriate here because page rule is the most important factor here not the DNS. 126.96.36.199 is the IP address for medium according to IP lookup sites/command line but if one inputs it, it gives the error;
DNS Validation Error (Code: 1004): Content for A record is invalid. Must be a valid IPv4 address (Code: 9005)
Apparently, it’s not a valid IP.
4. Leave the TTL as automatic and add the record.
5. Set the name value for CNAME as www, your sub domain as the domain name as in blog.example.com, leave your TTL as automatic and add record.
6. Next, click on page rules ;
7. Click on create page rule.
8. Then insert your subdomain beginning with an asterisk and ending with one as in :
9. Select “forwarding url” as your settings and 301-Permanent redirect.
10. In the last box, paste the URL to your medium account
11. Click “Save and deploy”.