how can i point my bastion host ec2 which don't have any public ip with godaddy domain? - devops

I have a bastion host ec2 ,which don't have any public IP address ,but i have one application load balancer which is integrated with private EC2 ,but when I added CNAME(ALB DNS Record) record with host name WWW in my Godaddy DNS records So my website works only with https://www.example.com ,all other urls like -
https://example.com,
http://example.com do not work.
after that I had use the domain forwarding feature of godaddy but through this feature I can forward only one url like- example.com to www.example.com but I want my all urls should work fine.
Do we resolve this issue by help of A record?
I added CNAME(ALB DNS Record) record with host name WWW in my Godaddy DNS records but my website works only with https://www.example.com .
I had use the domain forwarding feature of godaddy but through this feature I can forward only one url like- example.com to www.example.com .

I would suggest you start using AWS Route53 to manage the DNS records, after that, you can create A record to point to the ALB. You would have to create a hosted zone for example.com, then copy the name servers of it and use update your Godaddy configuration to use AWS name servers. More information can be found here: https://virtualizationreview.com/articles/2020/07/14/migrating-dns-services-aws.aspx

Related

Is there a way to get the iOS simulator to access a FQDN redirecting to my localhost?

I am running a local web server with SSL enabled that my app needs to log into. I have a domain name whose A-record is set to 127.0.0.1, which allows for local development using loopback with an nginx server with different subdomain configurations for services on the app I have hosted locally. The problem is that, in the iOS simulator, the domain resolves to the device's localhost and not my machine. I can't use the IP address of my machine because I need the domain for nginx to redirect to the proper vhost (also SSL and OAUTH would get mad).
Is there any way to use a custom DNS server for lookup in the simulator? Either that, or can I edit the hosts file to set the domain to my device's LAN IP instead of localhost? Any other ideas?

How to change IP address to host name in IIS server?

I have hosted my .Net project in IIS server and now I have the IP address.I want to change it to host name and I have already tried following steps
1) Add the Host Name in site bindings according to my existing IP address in IIS server
2) Do changes in host file(C:\Windows\System32\drivers\etc) according to the added host name
But I am getting following error when I navigate host name in browser
Bad Request - Invalid Hostname HTTP Error 400. The request hostname is
invalid.
What is the solution for this problem ??
Where did you host the IIS server? On-premise domain environment or Cloud VM with public firewall IP address?
If you are hosting the web server in domain environment, then you need to create a CNAME for your web server in DNS and set binding host header for your website in IIS.
If you are just hosting the web server in cloud VM, then you should purchase a public domain from domain provider like Godaddy and map the domain name to your Virtual machine'S public firewall address. After that, you should add host name to your IIS site. Finally, you should be able to access the website. Just remember to allow port number in firewall inbound rule.

Mask the server name in the url in IIS 7

I created a new mvc application, published it and deployed it on the sever under the default websites in IIS 7. Now I can access the website from my local system using the url http://server1/mymvcapp/login
Server1 is the server name where the application is deployed.
How can I mask the server name "server1" in the url to a more user friendly name, for example http://hellomvc.com/mymvcapp/login
You need setup DNS server or user hosted DNS (it's optional). You can read more here:
setup-a-website-with-dns-and-iis-7
and here:
installing-windows-dns-server
Usualy for host nameservers of domain name you need 2 external IP addresses.

How dns servers work know the ip address of website?

My question is that suppose my website is "xyz.com"
I can access it anywhere in the world, but I'm curious to know how does all the dns servers know the ip address of my website..?
I'm little bit confused..
The main process that resolves an IP Address through DNS is referrals. A DNS Server will go through a process to find the Authorative Nameserver for your domain. The Authorative Nameserver is the server that is configured to answer queries for that domain. i.e. the godaddy DNS Servers, if you have purchased, and configured a domain name through them.
If you go to www.example.com from your PC, it will send a query to your configured DNS server, asking for www.example.com
If your configured DNS Server knows that answer already, i.e. it has been asked the same question recently, it will return the answer from cache (as long as it hasn't expired)
If your configured DNS Server doesn't know, then it will find out. In order to find out what server knows the answer, it needs to look up the name server for example.com first.
So the first query the nameserver makes is to the root domain "." (All DNS Servers should have these configured) to find out the nameservers for the .com domain.
When it has an address for the .com domain's nameservers, it will send a query asking for the nameserver for example.com
when it has the address for example.com's nameservers, it will send the original query, for www.example.com, to that server, and return the answer to you (and put a copy in its cache incase anyone else asks)
Note: If you were looking for www.test.example.com then it would have asked example.com for the nameservers for test.example.com instead.
URL resolution in DNS happens from right to left.
DNS comprises of Root Servers, Top Level Domain(TLD) and Authoritative Servers
For the example www.example.com :
Root Server queries the TLD for '.com' extension
TLD searches the DNS cache for the domain, if not it queries the corresponding authoritative server for the domain 'example.com' to finally get the IP address for the host www.example.com, then return that IP address to your computer.
That's why there are DNS Root Servers.
At the top of the DNS system are DNS root servers. There are
approximately 500 root servers distributed around the planet,
addressed via 13 IP addresses. These root servers are the only ones
that contain the entire list of all domain names and IP addresses. So
eventually, a DNS request might make it all the way to the DNS root
servers if no other DNS server has the answer. If there is still no
answer at the root level, then the DNS request fails, and your browser
returns an error. Source

Site being cloned or deploy to domain I don't own

I'm deploying a Rails app to EC2 using Elastic Beanstalk. I just found out, while doing a search in google that whenever I deploy to my domain, my site seems to also get deployed to a domain I don't own. I use Route 53 for my DNS as well.
Has anyone ever run into this situation or have any idea what might be happening here?
It could be a simple DNS issue. Someone's DNS A record is pointing to the ip address of your EC2 instance
Amazon recycles ip addresses. It is possible that your current ip address was allocated to someone else earlier, and they have not deleted their DNS entry when releasing the ip address.
you can run ping command to confirm both domain names resolve to same ip address
ping domain1.com
ping domain2.com

Resources