Subdomain caching issue - caching

I have set up a subdomain abc.mysite.com to point a specific IP on another server. I did this by creating the following A records:
abc 300 in A xx.xxx.xx.xx and www.abc 300 in A xx.xxx.xx.xx
My host confirms that this was done correctly, however (3 days later) the domain still resolves intermittently. That is, sometimes it resolves to the correct IP and I see the correct page and other times I see a 404 error or a default website page from cpanel.
My host suggests that it is a caching issue and if I perform a flushdns and clear my browser cache, this fixes the problem. But i am puzzled as to why it reoccurs.
Could there by something on the other server triggering it? Or is it just a matter of waiting a little longer for propagation?
Forgive me if the problem isn't clear. This stuff is not my forte.

A 404 error indicates an error on the webservers side - not on the DNS level. That means, that if you see a 404 error or the cPanel default site, DNS is working fine but the web server does not respond.
http://en.wikipedia.org/wiki/HTTP_404#Overview
Check the web server logs and/or speak to your provider about the issue.

What was the TTL before you made your changes? I've seen 86,400 seconds (one day) and 604,800 (one week) as common choices in the past. (The important number is what the TTL was set to before you made your change, as that dictates how long stale data is held in DNS caches.)

Related

How to resolve cloudflare not displaying my website on my phone

I keep having this error when I try to access my website that is hosted on aws and using cloudflare CDN.
But the surprising thing is that it is loading correctly on another person's phone.
What can be the issue and how can I resolve it?
Cloudflare error
This error specified a connection error between Cloudflare and your Origin server.
There are a couple ways this could be occurring on your device but not another's -
If you recently added Cloudflare, the DNS may still be resolving to your Origin server (for the person who it is working for). You can check this by doing a ping on their device to your domain, and seeing if it resolves to your Origin IP. Or you can check the response headers for any with CF- prefix (which means it is likely routing through Cloudflare).
Another possibility is that your Origin server is blocking some Cloudflare servers but not others. For instance when you request the site, it may be routing through Cloudflare 'Server A', while when the other person requests your site, it is routing through 'Server B'. If 'Server A' requests are failing / being blocked, this would explain the behavior you are seeing. You can check your Origin server's access logs to see if this is occurring. If it is a blocking situation, you'll want to ensure all Cloudflare's IP are whitelisted - https://www.cloudflare.com/ips/
More troubleshooting information from the Cloudflare forums - https://community.cloudflare.com/t/community-tip-fixing-error-522-connection-timed-out/42325

Route53 records intermittently becoming invalid

I'm using Route53 to address EC2 instances within a VPC, and I set up my subdomain and CNAME records as described in this blog post. (I'm using name.com to manage the main domain, but my setup is otherwise identical.)
At first it was working fine, but then I noticed that the domain name record intermittently becomes invalid (NXDOMAIN), then resolves properly again a while later.
I used a script to monitor this over the course of several hours, and found that the time in between is always a multiple of 300 seconds, which happens to be the TTL of the subdomain in R53.
What might be the cause, or how can I proceed to debug this?
It sounds like you may have misconfigured one of the 4 assigned "ns-xxxx.awsdns.xx" authoritative DNS servers when you pointed your domain to Route 53 with your domain registrar.
Verify those settings.
For people who encounter this in the future: I stopped using the Route53 approach, and am using this one instead: http://alestic.com/2009/06/ec2-elastic-ip-internal

Production redirect loop error on root domain, but not with www

I'd like when a user types the domain YOURSITE.com to not go into a loop and crash. I've searched for answers for a couple days now and can't seem to find the exact one.
Error from chrome: This webpage has a redirect loop - The webpage at http://YOURSITE.com/ >has resulted in too many redirects. Clearing your cookies for this site or allowing third->party cookies may fix the problem. If not, it is possibly a server configuration issue and >not a problem with your computer.
Background:
Rails 3.2.14 App with Ruby 2.0.0
Domain bought with godaddy
Hosting on Heroku with both domains setup www.YOURSITE.com and YOURSITE.com
Using AWS with route 53 and S3.
Let me know what relevant code you need to help or if this is something that is being caused by AWS or the like. I've tried an reversed several different things via my code, but can't seem to find anything that works.
you should log into your Heroku dashboard, click on the app and then click on the "Production Check" button. This will help you check for DNS issues among other.
Check your DNS Zone file with godaddy. How are you redirecting the sub domain www to the host domain?
On your rails app, how is your route.rb file handling the incoming traffic? do you have any redirection there?
Hope that helps..
There is a very good write up that goes through configuration settings between AWS, the domain registrar (in my case godaddy), and heroku here: https://devcenter.heroku.com/articles/route-53#naked-root-domain I used this originally when I set up my site.
I wish I could say I know what the problem was, but I'm not totally sure what it was. My guess is that it had to do with APEX domains being unsupported by AWS and/or Heroku, and therefore I needed not to try to redirect. Here's the settings that worked for me:
Godaddy domain mysite.com, transferred my DNS stuff to AWS (I had done that prior to the problem)
Heroku: you can either use the CL or you can access the settings for your app online. In either situation I set up my domains to be mysite.com and www.mysite.com
AWS: This is a little trickier. You need to make sure the settings for Route 53 and S3 are exactly like in the tutorial link above. Your mysite.com bucket in S3 must redirect to www.mysite.com.
This isn't ideal and there are probably ways to get around this using different companies for hosting/DNS services, but with the Heroku/AWS combo this is what I had to do to stop the redirect loop.

Joomla site "Not found" error

I have a Joomla 2.5 site set up but when I try to access the domain I get an intermittent error on the screen just saying "Not found". It sometimes happends when visiting with www, sometimes with http:// and sometimes with http://www.
Here is the error: http://imgur.com/7f6ak
I have done a thorough look into the domain and all the DNS and records are working as expected and resolving correctly all around the world making me think it must be a Joomla error of some kind.
I have also tried to enter the sites domain into the $live_url in the configuration file but it stil happends.
Any help or ideas greatly appreciated
In short, it's sometimes not finding your site, so not knowing if you host the site or you use a service...
We occasionally experience this if we haven't copied the site across all the servers on our load balancer - Perhaps checking if all your servers have the site, or if your host has load balancing and it didn't get propogated properly. Also be sure the apache or htaccess settings are the same to account for the www or not.
Either you installed Joomla to another directory or the DNS still haven't resolved. Try to ping your site to see which IP it's responding to.

Moved hosts, how do I view the site?

I recently moved hosts with my blog and I have waited 72 hours for it t propergate properly. I just checked the site there and it's showing it on the old host. When i use a proxy, I can see the site perfectly on the new host. The problem seems to becoming from my PC.
EDIT: Tried to flush the dns and it's the same story, it's quite weird.
Any idea?
Your old DNS records will live in various DNS caches until their TTL (time-to-live) timers expire.
Best practice is to revise your DNS records well before the move, and pull the TTL (time-to-live) timeout values low, leaving enough time for the old records to timeout and get refreshed with the short-TTL records. Then after the move you put the TTL values up on the new records (for efficiency).
Now that you're in this situation, you'll have to put up with the inconsistency until all the cached records expire. If you have a way to put an HTTP redirect on the old web server, pointing to an IP URL, that could tide you over in the short run.
Your ISP is the one the one caching the record. Uses a hosts file http://en.wikipedia.org/wiki/Hosts_file to temporarily force your computer to use the new ip address.
Sounds like you have the DNS cached on your box. This could be cached on your PC or at your DNS server. Short term options; can try to flush your DNS cache, you can edit your hosts file to temporarily point at the right location.
Open a command prompt and type:
ipconfig /flushdns
then try your site again.
I see this:
www.keithdonegan.com [81.17.254.87]
My DNS changes always propagate in minutes, a couple of hours at the most.

Resources