Mobile app version of vmapp.org
Login or Join
Jennifer507

: Cloudflare DNS: How to 301 Redirect all traffic from Sub Domain to Main Domain with URL path? I am using cloudflare to manage my domain, and I wanted to add a subdomain. I tried to do this:

@Jennifer507

Posted in: #Cloudflare #Dns #Domains #Subdomain

I am using cloudflare to manage my domain, and I wanted to add a subdomain. I tried to do this:

But it gives me an error. How would I add a subdomain like blog.arunpattni.com that sends to arunpattni.com/blog ?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jennifer507

1 Comments

Sorted by latest first Latest Oldest Best

 

@Turnbaugh106

The error you are receiving is because CNAME's only support domain names and not URL paths. You can setup a redirect using your hosting account or Cloudflare Page Rules.

14 Step Cloudflare Process in redirecting traffic from subdomain to main domain using Page Rules:


Login to Cloudflare
Use the drop-down menu in the upper left of your screen and click your domain that you want the redirect to take place on.
Click the DNS icon at the top of the screen.
Select CNAME using the drop-down options
Add the sub domain in NAME
Add your domain name in Domain name
Leave TTL as automatic and Cloudclare enabled, click Add Record button.
Click Page Rules icon
Click Create Page Rule button
Add alexa.example.com/* in the URL match field
Click + Add a Setting, find Forwarding URL and click it
Select the status code 301 - Permanent Redirect
Add the Enter destination URL as example.com/alexaSkillDemo Click Save and Deploy button.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme