How to map domain url to another domain? - domain-mapping

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.

Related

Redirect url one domain to another domain use kubernetes

I want to redirect the url from one domain to another domain.
Like "https://example.com" (Domain A) To "https://sample.com (Domain B). For that we need to use middleware in kubernetes.
To redirect url to Domain A - in Internet to Domain B - In intranet in kubernetes.

Route 53 domain only works when prefixed with http(s)://

I have an application that runs fine in AWS App Runner and can be found here: https://iyarles.net
However, it's not accessible via the naked domain name iyarles.net.
Clarification comment: If I goto iyarles.net in my browser (edge), the request times out. If I goto iyarles.net, my website loads fine.
The App Runner service has a custom domain configured and my hosted zone has the 2 certificate validation records and the alias record pointing to my service.
A few weeks ago I transferred my domain from Google Domains to Route 53. It was originally a redirect from iyarles.net or any other subdomain (with or without https://) to the default domain for my service.
How can I replicate the previous behavior? What exactly are these alias records doing?
When you type the hostname into the browsers address bar, browsers will assume you want to make a plain HTTP request.
When you explicitly include the https: scheme, browsers will make a secure HTTP request.
Your server is running an encrypted service on port 433. It is not running a plain service on port 80.
It times out if you type http://iyarles.net too.
The issue is that the custom domain configured in AWS App Runner is not accessible via the naked domain name, iyarles.net. To replicate the previous behavior, you will need to create an Alias Record in your hosted zone in Route 53, which will point your domain name to the service URL.
The Alias Record is used to route traffic from a domain name to the service URL. It will ensure that any requests to the domain name will be routed to the service URL, thereby allowing your application to be accessible via the naked domain name.
It is important to note that you will also need to create two Certificate Validation Records in your hosted zone in Route 53. These records are used to validate the SSL Certificate for your domain name, which is necessary for HTTPS connections.

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

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.

Https redirect from DNS Host?

So I'm trying to figure out if this is something I can configure through my DNS host or if I need to set this up on my app server.
My situation
I have a heroku app and domain name (lets say example.com) which is set up for https on both www and root/apex. So https://example.com and https://www.example.com both work. I am also able to redirect any http requests (both www or root/apex) to domain to the https equivalent so in other words:
http://www. redirects to https://www. and http://root redirect to https://root.
My issue
I want all combinations of my urls (http or https and www or root) to direct to a single url (https://www or https://root). My aim is to just have consistency in the urls. I noticed that most redirects work EXCEPT when trying to redirect from https://example.com to anything else.
What is the DNS host approach for this? And if it's not possible from DNS host the normal approach?
DNS provides translation from the domain name in a URL to an IP address that the client can contact. If your problem involves anything else whatsoever in the URL, it's not a problem DNS can solve.
The problem you describe involves the difference between HTTP and HTTPS. This is not part of the domain name in the URL. Therefore, DNS is not your problem.

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.