The WordPress website was accessible via a Public IP however after URL rewrite (IP to the domain name) it showed 'DNS_PROBE_FINISHED_NXDOMAIN'. The domain DNS is resolving to the IP and I am not seeing any issue on the web server. I tried flushing local IP and also tried from different devices assuming it could be DNS cache but the issue remains.
Any thoughts?
Related
My setup:
Bitnami Wordpress
GCP VM
GCP HTTPs Load Balancer
Load Balancer has http to https redirection, www to non-www redirection
Cloud CDN
Main Problem:
The VM's external IP (22.22.22.22) is indexed by Google Search. I'm unable to remove it from Google Search because it is not recognized as a property that belongs to me and the indexed page (http://22.22.22.22/home) is live. http://22.22.22.22/home is resolved to example.com which is a live page.
what I have checked
The domain name and Load Balancer's IP is properly resolved
No new mod_rewrite rules other than those from the default installation
The site does not have any reference to VM's external IP, including database
No cache plugins installed
Wordpress's site address and home address is pointing to http://example.com
what I have done to rectify
I've added 301 redirects which I'm not sure if that helps. It will take some time to check if that works.
My questions
Is there a way to prevent Google from indexing IPs(Any IPs in general)?
How to prevent VM's ext. IP from being indexed by Google especially when load balancer is in use?
There is a simple solution but it takes time. Configure the Apache web server to redirect IP-based queries to your domain or return an error. Google Search will eventually notice the redirect and remove the IP address from search queries.
For redirects, use a permanent redirect (301).
301 Moved Permanently
How To Create Temporary and Permanent Redirects with Apache and Nginx
There are WordPress plugins to do the same, but I prefer to configure Apache directly and not add another plugin to a site.
Is there a way to prevent Google from indexing IPs(Any IPs in
general)?
No, Google can index any site, IP or Hostname based, that is public unless restricted via robots.txt.
Introduction to robots.txt
How to prevent VM's ext. IP from being indexed by Google especially
when load balancer is in use?
You can create a VPC Firewall rule that only allows traffic from the load balancer and blocks Internet ingress traffic.
Load Balancer Firewall Rules
Additional information:
Remove a page hosted on your site from Google
I have the domain 'alexdollard.xyz' registered with Google domains
I added the custom resource record 'wp' as a type A, and pointed it to my digitalOcean droplet (a Wordpress instance)
I then added a CNAME record for www, and pointed it at my Netlify-hosted site. (This Netlify site is a gatsby/react site which will query my wordpress instance for blog-post data)
When I ping the IPv4 address of the wp subdomain in my terminal, I get a response. But when I ping 'wp.alexdollard.xyz', I get unknown host. And when I run it in the browser I get "wp.alexdollard.xyz’s server IP address could not be found."
I've been working with this subdomain for a while now and this issue just started. wp.alexdollard.xyz was working until yesterday.
I have already tried renewing my DHCP Lease, flushing my dns cache, and changing my DNS servers to public servers. For context, this issue didn't start until I deployed the site to Netlify, and pointed the google DNS name servers for alexdollard.xyz to the Netlify name servers. But wp.alexdollard.xyz should still point to this digitalOcean droplet since it's a subdomain, right?
I'm sorry if this question is sophomoric or dumb, it's possible that I really just don't understand the basics of DNS configuration. Seems like something simple is going on. What is causing this issue with my DNS?
DNS entry seem correct:
dig a wp.alexdollard.xyz
;; ANSWER SECTION:
wp.alexdollard.xyz. 3600 IN A 134.209.73.194
it is also resolving globally: https://www.whatsmydns.net/#A/wp.alexdollard.xyz
I can see two options here:
your local DNS is stil propagating or needs to be flushed
your droplet is not accepting this domain
I am trying to set up a secondary web site hosted on our local domain controller running IIS-8.
I already have one site working successfully thought our network, the default site.
I have successfully got the second one to work on the localhost (the domain controller Server 2012-R2), but I can't seem to access it from any of the other workstations on our network.
I added the new site.
Set the binding to IP address:192.168.1.1, Port:80, Host Name:dyo.mysite.com
I have modifed C:\Windows\system32\drivers\etc\hosts to show 192.168.1.1 dyo.mysite.com, and I have added an alias to the forward lookup Zone in the DNS Manager. (Name:byo.mysite.com, FQND:byo.mysite.com.mydc.com, Target Host: 192.168.1.1)
I can't seem to access the site from any of the network work stations. I have tried many combinations of addresses, http://byo.mysite.com, 192.168.1.1/byo.mysite.com, \mydc\byo.mysite.com, etc.
I would imagine that I am probably missing something simple. I just don't know it is.
Any insight would be greatly appreciated.
To get your server accessed from other workstation. You have to promise
Your IIS site can be accessed via IP address directly.
the client workstation is using your DNS
Your client workstation is not bypassing your DNS server by .pac proxy
So could you get access the website via IP address by disabling default website and set the site to unassigned IP or 192.168.1.1 with null domain name?
If you want to access the website via byo.mysite.com. Then you shouldn't set FQDN like byo.mysite.com.mydc.com. because Web browser will never consider byo.mysite.com as an alias but a different server. That's why When you set FQDN like byo.myDC.com, you could get work by access http://dyo and you could also access website via byo.mysite.com.mydc.com but fail with byo.mysite.com.
How to set DNS correctly
To get it work, please create an new primary Forward Loopup Zone named mysite.com. Then create a new HOST(A) record to map to your machine name like dc.mysite.com and 192.168.1.1. Then create an Alias(CNAME) called www to map to this A NAME. Then the FQDN will be www.mysite.com.
Finally bind your IIS site and access the website should work.
PS: Please make sure your other workstation is not using a proxy.
The registrar for my domain is godaddy, I go to their DNS records section and I changed the A name to the elastic IP associated with my instance. Now when I type my domain in the browser, my website appears! However, it forwards it to the IP of my server.
Things I've tried (whether logical or not):
I'm using wordpress multsite so I changed the DOMAIN_CURRENT_SITE in wp-config.php to my new domain. No luck. Reverted.
I changed the 'site_url' and 'home' in my database to point to my domain. No luck. Tried one at a time etc. Reverted.
Changed ServerName to my new domain in httpd.conf (apache).
sudo hostname www.... (don't know what that does)
So I'd like to simply have my website open without it showing the IP in the address bar. Can someone help?
Thanks
EDIT:
Here's the DNS page of godaddy, I've blanked out the ip in the A records, but it's just the ip of my server.
First you need to set Custom NS in godaddy with AWS dedicated IPs then set them as DNS. If you are using Linux instance with cPanel then just add the domain in cpanel's addon-domain.
If you are using Windows instance then you should configure IIS.
I am close to tearing my hair out on this issue as I just cannot seem to get my Wordpress site to not read the Amaazon Public IP address.
I have a domain name in GoDaddy and have changed a host record so that my domain name "http://example.com" redirects to "http://0.0.0.0".
However once this page loads, the url quickly changes back to the Public IP address.
I have tried changing the Site URL in the Wordpress Settings but this just breaks the site and does not allow me to log in.
What is it I am doing wrong? I just cant figure it out. I just want the domain name from goDaddy to appear as the URL.
Thanks.
First of all attach the Elastic IP to your EC2 Instance so it wont change public IP after you shutdown and restart your machine. Make A Record in your Godaddy DNS Record File that points to the elastic IP.
You have not changed the base URL of your wordpress thats why it is still redirecting to the old Base URL. Connect to your EC2 instance and edit wp-config.php add the following line of code
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');