Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have an /etc/hosts block on 2o7.net and it seems that Apple's metrics.apple.com is a DNS alias for 2o7. When navigating apple.com with Chrome or Safari, I get the following:

Failed to load resource: the server responded with a status of 404 (Not Found) 

Whenever I get this message Javascript seems to break and pretty much even link on the site is ignored. I'm not sure if this is a browser bug.

I don't want to unblock 2o7.net but would obviously like the site to work. Any ideas?

share|improve this question

1 Answer 1

dig metrics.apple.com gives

metrics.apple.com.  4107    IN  CNAME   appleglobal.112.2o7.net.
appleglobal.112.2o7.net. 249    IN  A
appleglobal.112.2o7.net. 249    IN  A

so you could try to dynamically update your hosts file every hour or so:

grep -v metrics.apple.com /etc/hosts > /tmp/raw-hosts
echo $(dig metrics.apple.com | 
       grep ^appleglobal | 
       head -1 | cut -c 35-) metrics.apple.com appleglobal.112.2o7.net >> /tmp/raw-hosts
mv /tmp/raw-hosts /etc/hosts
share|improve this answer
These IPs invariably change often, the nature of a CDN. –  Jason Salaz Apr 8 '13 at 16:42
Ah, good point. –  patrix Apr 8 '13 at 17:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.