: 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:
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 ?
More posts by @Jennifer507
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.