During the past twenty years the Domain Name System (DNS) has sustained phenomenal growth while maintaining satisfactory performance. However, the original design focused mainly on the system robustness against physical failures, and neglected operational errors, such as misconfigurations or denial of service attacks. This dissertation focuses on studying the impact that these two types of errors have on the performance of the DNS, and proposes a set of enhancements that greatly improve the resilience of the system against these errors. By conducting a rigorous measurement study we identified four types of DNS configuration errors: delegation inconsistency, lame delegation, diminished redundancy and cyclic dependency. Domains with configuration errors suffer from reduced availability and increased query delays up to an order of magnitude. Furthermore, while the original DNS design assumed that redundant DNS servers fail independently, our measurements show that operational choices made at one domain can severely affect the availability of other domains. We found that, left unchecked, DNS configuration errors are widespread, with lame delegation affecting 15% of the domains, delegation inconsistency appearing in 21% of them, diminished redundancy being even more prevalent, and cyclic dependency appearing in 2% of the domains. However, the degrees of misconfiguration vary from zone to zone, with most popular zones having the lowest percentage of errors. In order to cope with configuration errors we have developed a configuration verifier, which operators can use in order to detect errors in their domains. Due to its hierarchical tree structure, the DNS is potentially vulnerable to denial of service (DoS) attacks that target its most critical nodes. As such, several recent efforts proposed to re-implement the DNS as a peer-to-peer network with a flat structure that uses a Distributed Hash Tables (DHT) for the name lookups. In this dissertation we compare the performance and availability of these two designs. We show that the caching and redundancy mechanisms in each design are closely bound to its system structure. Using analysis and trace-driven simulations, we show that the hierarchical structure enables superior cache performance while the flat structure provides higher resilience against DoS attacks. Based on these results, we have developed and evaluated two alternative caching schemes for the DNS that greatly improve its resilience against DoS attacks, making it as robust as a DHT system. Both caching schemes seek to reduce dependency on higher level domains, either by aggressively replicating the DNS structure or by utilizing information cached in a group of caches.