DNSCheck

Free webmaster utilities

.htaccess Generator

Generates a ready-to-use .htaccess file for Apache-based hosting (cPanel, most shared hosts). Tick the options you need, fill in any extra fields below, then click Generate and paste the result into your site's .htaccess.

Notes
  • Requires mod_rewrite (HTTPS/www redirects, hotlink protection), mod_deflate (gzip) and mod_expires (caching) - virtually all cPanel hosts have these enabled by default.
  • Back up your existing .htaccess before replacing it - a bad rule can take the whole site down until it's fixed.
  • Custom redirects/error paths should be site-root-relative, e.g. /old-page, or a full https://... URL for redirects to another domain.
  • After uploading, reload the site. If you get a 500 error, remove the newly added block first to isolate which directive caused it.
More recipes (not covered by the checkboxes above - copy what you need)
Redirect an entire old domain to a new one
RewriteEngine On
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
Block a specific IP address
<RequireAll>
    Require all granted
    Require not ip 123.123.123.123
</RequireAll>
Deny access to sensitive file types (e.g. .env, .log)
<FilesMatch "\.(env|log|ini|sql)$">
    Require all denied
</FilesMatch>
Change the default index page
DirectoryIndex home.html
Maintenance mode (show one page to everyone except your own IP)
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123$
RewriteCond %{REQUEST_URI} !/maintenance\.html$
RewriteRule ^(.*)$ /maintenance.html [R=302,L]

Cron Expression Generator

Build a standard 5-field cron expression (minute, hour, day-of-month, month, day-of-week) using the fields or presets below, then paste it into cPanel → Cron Jobs, or your server's crontab.

* * * * *
Runs
Notes
  • * means "any value"; */N means "every N units" (e.g. */15 in the minute field = every 15 minutes).
  • A range like 9-17 means "9 through 17"; a list like 1,15 means "1 and 15" (both can go in any field).
  • Day-of-week uses 0 = Sunday through 6 = Saturday (7 is also accepted as Sunday on most systems).
  • This only builds the schedule. You still need to supply the actual command to run.
Using it on a Linux terminal (crontab)

If you have SSH access instead of (or in addition to) cPanel's Cron Jobs page, here's the full workflow:

1. Open your crontab for editing
crontab -e

Opens your personal crontab in the terminal's default editor (often vi/nano). First time, it may ask you to pick an editor.

2. Add a line: the cron expression, then the command
*/15 * * * * php /home/youruser/public_html/dns/cron_check.php

Copy the generated expression above and paste it at the start of the line, followed by a space and the full command. Save and exit (in nano: Ctrl+O then Enter, then Ctrl+X).

3. Log the output so you can debug it later
*/15 * * * * php /home/youruser/public_html/dns/cron_check.php >> /home/youruser/cron.log 2>&1

>> file 2>&1 appends both normal output and errors to cron.log instead of silently discarding them (or emailing you every single run, which most systems do by default if you omit this).

4. Verify it's scheduled
crontab -l

Lists every cron job currently scheduled for your user, so you can confirm it saved correctly.

5. Find the full path to a binary if "command not found" shows up in the log
which php

Cron runs with a minimal environment (no shell profile, no PATH additions) - always use the full path returned here (e.g. /usr/local/bin/php) instead of just php if the job fails to run but works fine when you type the same command directly in the terminal.

On cPanel without SSH (Cron Jobs UI)

Go to cPanel → Cron Jobs. Either pick "Common Settings" for the presets above, or select "Once Per Custom Interval" / choose each field manually - Minute, Hour, Day, Month, Weekday map directly to the 5 boxes at the top of this tool. Paste the full command (e.g. php /home/youruser/public_html/dns/cron_check.php) into the Command field, then click Add New Cron Job.

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text. Runs entirely in your browser - nothing is sent to any server.

How to use
  • To encode: type or paste plain text into the Input box → click Encode → → the Base64 result appears in Output.
  • To decode: paste a Base64 string into the Input box → click ← Decode → the original text appears in Output.
  • Use the two buttons above the Input box to load a working example for either direction if you just want to see it in action first.
  • Handles UTF-8 text correctly (emoji, accented characters, non-Latin scripts).
  • Decoding invalid Base64 (wrong characters/padding) will show an error rather than garbage output.
  • Base64 is an encoding, not encryption - anyone can decode it back to the original text. Don't use it to hide secrets.
Where Base64 is actually used
HTTP Basic AuthThe Authorization: Basic <value> header sends username:password Base64-encoded (not encrypted - only use over HTTPS).
Data URIsSmall images/fonts embedded directly in CSS or HTML, e.g. <img src="data:image/png;base64,iVBORw0KG...">, to avoid an extra HTTP request.
Email attachments (MIME)Email only reliably transmits text, so binary attachments are Base64-encoded inside the message body.
JWTs (JSON Web Tokens)The header and payload segments of a JWT (the parts separated by dots) are Base64URL-encoded JSON.
Embedding binary in JSON/XML/config filesThese formats are text-only, so binary data (keys, small files) is often Base64-encoded to fit inside a string value.

JSON Formatter / Validator

Paste any JSON to pretty-print it, validate its syntax, or minify it for production use. Runs entirely in your browser.

How to use
  • Paste your JSON into the box above (or click Load valid example to see a working sample first).
  • Click Format & Validate to pretty-print it with 2-space indentation - if it's invalid, you'll get the exact line and column of the problem instead of a formatted result.
  • Click Minify instead when you need the smallest possible size (e.g. for a config file or API payload) - it strips all whitespace and line breaks.
  • Click Load invalid example to see exactly what an error message looks like before you hit one for real.
Common JSON mistakes (and how to fix them)
Trailing comma{"a": 1, "b": 2,} → remove the comma before } or ]. JSON (unlike JavaScript objects) never allows a trailing comma.
Single quotes{'a': 1} → JSON requires double quotes for both keys and string values: {"a": 1}.
Unquoted keys{a: 1} → keys must always be quoted strings: {"a": 1}.
Comments// like this or /* like this */ → not allowed anywhere in JSON. Remove them before validating.
Unescaped characters in stringsA literal " or backslash inside a string must be escaped: "He said \"hi\"".
NaN, undefined, or single values without quotesOnly true, false, null, numbers, strings, objects and arrays are valid JSON values.

Regex Tester

Test a regular expression against sample text, with live match highlighting and capture groups as you type.

Email address\b[\w.-]+@[\w.-]+\.\w{2,}\b
URLhttps?://[^\s]+
IPv4 address\b\d{1,3}(\.\d{1,3}){3}\b
Hex color code#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b
Date (YYYY-MM-DD)\d{4}-\d{2}-\d{2}
US phone number\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}
Notes
  • Flags: g global (find all matches), i case-insensitive, m multiline (^/$ match line boundaries), s dot matches newline.
  • Without the g flag, only the first match is shown.
  • This uses JavaScript's regex engine - mostly compatible with PHP/PCRE and Python, but a few advanced features (like lookbehind support in older browsers) can differ.

HTTP Header Checker

Fetches a URL from our server and shows the exact status code and response headers it returns - useful for debugging redirects, caching headers, security headers (HSTS, CSP), and CDN behavior.

Notes
  • Redirects are not followed, so you see the headers of the very first response - useful for inspecting a redirect itself rather than its destination.
  • SSL certificate errors on the target are ignored so you can still inspect headers on a misconfigured HTTPS site.
  • Requests are made from our server, not your browser, so results reflect what any visitor/crawler would see (not affected by your browser extensions, cache, or cookies).
Common headers & what they mean
ServerSoftware running the web server (e.g. nginx, Apache, cloudflare) - sometimes hidden for security.
Content-TypeThe MIME type of the response body, e.g. text/html; charset=UTF-8.
Cache-ControlHow long browsers/CDNs may cache the response, e.g. max-age=3600, no-store.
LocationPresent on 3xx redirects - the URL the client should follow next.
Strict-Transport-SecurityTells browsers to always use HTTPS for this domain (HSTS) - a good security sign.
X-Frame-Options / Content-Security-PolicyControls whether the page can be embedded in an iframe - protects against clickjacking.
Set-CookieSets a cookie in the visitor's browser - check for Secure and HttpOnly flags.

Server Response Code Checker

Check the HTTP status code for up to 10 URLs at once - handy after a site migration or bulk redirect setup to confirm nothing 404s or loops.

One URL per line, up to 10.

Notes
  • Redirects are not followed - a 301/302 shows as that code, not the final destination's. Use the HTTP Header Checker tab's Location header to see where it points.
  • All URLs in the list are checked in parallel, one request each, from our server.
  • Limited to 10 URLs per run to keep it fast and within the site's rate limits.
Common status codes
200 OKRequest succeeded - the normal, healthy response.
301 / 308Permanently moved - update your links/bookmarks to the new URL.
302 / 307Temporarily moved - the original URL should still be used in the future.
304 Not ModifiedCached version is still valid - no body was sent, saving bandwidth.
404 Not FoundNo resource exists at that URL - check for typos or a broken link.
429 Too Many RequestsRate limited - you're sending requests faster than the server allows.
500 Internal Server ErrorThe server hit an unhandled error - check server/application logs.
502 / 504Bad Gateway / Gateway Timeout - an upstream server (proxy, PHP-FPM, backend) failed or timed out.
503 Service UnavailableServer is temporarily overloaded or down for maintenance.