My custom domain is redirecting to appname.cfapps.io but after redirecting URL is changing to appname.cfapps.io instead of my custom domain - deployment

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.

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.

Related

How to map domain url to another domain?

I have domain ex: cards.com and
I have an web app which run's on the domain example.com
The app run's on a serverless platform. I have no IP or VM for my app
I don't want to expose example.com, I want to map this example.com to cards.com/example
can anyone let me know how map this ?
I Solved it by
Mapping my domain cards.com to example.com in DNS Records and had a custom API Gateway that routes it to the app that I want.

Redirect a domain to a subdirectory of another domain

I have a domain "first.com" and I have a blog on this domain "first.com/blog" (hosting in OVH)
I would like to create a redirection: "first.com/blog" to "blog.second.com" (hosting Heroku for rails app)
I think I have to configure OVH DNS to create this "redirection", but i don't know how.
Thx for helping.

Redirecting sub-domain to specific URI

I want to redirect my subdomain to specific URI without making any changes to my code.
I found the domain forwarding services from Bigrock, they have a sub-domain forwarding service which specifies all subdomains will be redirected as "subdomain.mydomain.com to yourdestinationurl/subdomain/"
I replaced yourdestinationurl, with www.mydomain.com but it's not working.
Am I doing something wrong?Is there any alternative way to do this?
You may create the subdomain in the DNS Manager/Domain name zone file and point it to any URL using 'URL-Redirect' DNS record.
In other words, you need to login into the account of your domain name registrar (if the domain name is delegated to the default nameservers) or into your hosting cPanel (if you have a hosting plan). Then you need to find where to configure DNS records and configure URL-Redirect (also called URL-Forwarding) for your subdomain.
There is no need to have any plugins.

Plesk and domain hosted externally

I have two hosting accounts (Personal one and a work one). I am doing some testing and would like to create a subdomain of a work domain (manage.domain.com) and host it on my personal account. Currently, my personal host is through 1and1 and is dedicated while the work one is shared with GoDaddy.
Work
I have gone into go daddy and created the subdomain. I have also added DNS records such as A, AAAA AND NS (i did not record a CNAME). I have noticed that if is type manage.domain.com it is redirecting to my personal server. However, it is directing to the blank admin page of the root of the server (which is maintained using Plesk).
Personal
Using Plesk I added the website (domain.com) and created the subdomain (manage.domain.com). I have also updated the websites hosting access using Plesk and assigned it the default values of my personal account. Using Plesk I also set the subdomain to the particular location of the files I want to test. However, I cannot get my server to recognize the address and redirect it to the proper location.
Any help is greatly appreciated!
J
You can just create:
in personal account domain(not subdomain) manage.domain.com
on domain.com add DNS record of type A, name "manage" and IP address of personal hosting:
After that "manage.domain.com" will resolving to hosting of your personal account and can be accessed because such domain exists.
I figured it out
What i did above was correct expect do not change the name servers on the work DNS(godaddy).
Add the website to plesk - it will give you an error about not being able to control the DNS settings which you have already adjusted on the original server (godaddy)
Add a subdomain of the website.
*** Ensure the subdomain is pointed to the correct folder within your server
Done

How to github custom domain on Hostgator?

Im trying to have a custom domain for my github hosted blog, i changed the CNAME file to have my custom domain, head to my hostgator account, but i don't have access to the Cpanel, only a domain management dashboard where it only has a name server fields to edit, i suppose i need to change my DNS to the following:*
192.30.252.153
192.30.252.154
CNAME username.github.io
*
However there is no way i can do that on Hostgator name server only dashboard.
where does the CNAME username.github.io goes ?
Screen Shot to hostgator domain management dashboard
I contacted Hostgator and asked them to edit my DNS information from their side and they were helpful and add the IP address and CNAME for me.
Problem Solved