Skip to content

ericrasch/script-check-netlify-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netlify DNS Checker

A simple bash script that verifies whether domains are properly configured to point to Netlify's hosting infrastructure.

Overview

This utility checks a list of domains to determine if they're pointing to Netlify servers by examining their DNS records. It's useful for:

  • Auditing multiple domains at once
  • Verifying Netlify migrations
  • Monitoring DNS configurations
  • Troubleshooting hosting issues

Features

  • 🔍 Batch DNS checking for multiple domains
  • ✅ Clear visual indicators for DNS status
  • 🚀 Fast DNS lookups using dig
  • 📋 Simple text file input format
  • 🎨 Color-coded terminal output

Requirements

  • Bash shell
  • dig command (usually included with dnsutils or bind-utils package)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/script-check-netlify-dns.git
cd script-check-netlify-dns
  1. Make the script executable:
chmod +x check_netlify.sh

Usage

Basic Usage

  1. Add your domains to domains.txt (one per line):
example.com
another-site.com
my-blog.org
  1. Run the checker:
./check_netlify.sh

Custom Domain List

You can specify a different domain file:

./check_netlify.sh custom-domains.txt

Output

The script provides color-coded output for each domain:

  • Green: Domain points to Netlify
  • 🟡 Yellow: Domain has DNS records but doesn't point to Netlify
  • Red: No DNS records found

Example output:

Checking DNS for domains...

Checking example.com... ✅ Points to Netlify
Checking another-site.com... 🟡 Does not point to Netlify
Checking my-blog.org... ❌ No DNS records found

Checked 3 domains

How It Works

The script identifies Netlify-hosted domains by checking:

  1. CNAME Records: Looks for records ending with netlify.com.
  2. A Records: Matches against known Netlify IP addresses:
    • 75.2.60.5
    • 99.83.231.61
    • 100.28.201.155
    • 34.234.106.80

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built for quickly auditing DNS configurations
  • Inspired by the need to verify bulk domain migrations to Netlify

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages