spatie/laravel-rdap
Laravel package for performing RDAP lookups (WHOIS successor) to fetch domain registration data as structured JSON. Includes built-in caching for TLD server discovery and RDAP responses, plus configurable retries/timeouts for unreliable endpoints.
.com may not be supported by all registries). Validate target TLDs before adoption..com).json, curl).composer require spatie/laravel-rdap
php artisan vendor:publish --provider="Spatie\Rdap\RdapServiceProvider"
use Spatie\Rdap\Facades\Rdap;
$domainData = Rdap::query('example.com');
DomainValidator).config/rdap.php to specify registry URLs (e.g., for private RDAP servers).Cache::tags() for domain-specific invalidation.try-catch or use Laravel’s HandleExceptions.curl https://rdap.verisign.com/com/v1/domain/example.com
.de) throttle requests. Implement circuit breakers (e.g., Laravel Horizon jobs with retries)..com, .org) to validate data quality and performance.Monolog channel).Rdap::query() for pre/post-processing.GuzzleException: Network timeouts → Increase timeout in config.JsonException: Malformed responses → Validate with json_last_error().CacheException: Redis down → Fallback to database cache.Rdap::setClient(Rdap::client()->withMiddleware(new \Spatie\Rdap\Middleware\LogRequests));
domain:example.com) across Redis nodes.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| RDAP endpoint down | No domain data | Fallback to WHOIS or cached stale data. |
| Rate limiting | Throttled requests | Implement exponential backoff + queue delays. |
| Malformed JSON responses | Application crashes | Validate responses with json_decode() checks. |
| Cache stampede | Database/Redis overload | Use probabilistic early expiration (e.g., 5% shorter TTL). |
| TLD unsupported | Missing data for critical domains | Whitelist supported TLDs or add manual fallbacks. |
How can I help you explore Laravel packages today?