I have a project deployed in cloud foundry(Pivotal Web Services). It has given domain name as appname.cfapps.io. I want to change the cloud foundry URL to my custom domain. So i registered a domain in namecheap.com. Then added my site in cloudfare and then added two DNS names of cloudfare to my namecheap account.

Then i used below three commands to redirect my new domain to cloud foundry domain.

$cf create-domain myorg mydomain.com 
$cf map-route myapp mydomain.com -n myapp
$cf map-route myapp mydomain.com -n www

Now, my new domain name is redirecting to cloud foundry domain name. But the issue is after entering my new domain name, it is redirecting to my website but my URL is getting changed from "My new domain name" to "appname.cfapps.io"

Any help is appreciated.

1

There are 1 best solutions below

2
Dan Higham On

What kind of records do you have in Cloudflare and where do they point to? I have the same setup for one of my sites and I used two CNAME records and it all works just fine. Cloudflare CNAME records