Add domain_extractor - URL parsing gem #1179
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add domain_extractor - URL parsing gem
Project
What is this Ruby project?
domain_extractor is a lightweight, production-ready Ruby gem for parsing URLs and extracting domain components—including support for multi-part TLDs (like
.co.uk,.com.au,.gov.br). It delivers reliable domain, subdomain, root domain, and TLD extraction even from complex or deeply nested URLs. Built on top of Ruby's standardURIlibrary and thepublic_suffixgem, it also provides features like:nilfor invalid URLs or IP addresses)What are the main differences between this Ruby project and similar ones?
.co.uk,.com.au,.gov.br, and all recognized multi-part suffixesparse(url)handles almost any URL in the wilddomain_extractor is ideal for anyone needing robust domain handling in Ruby apps—particularly use cases involving international URLs, analytics pipelines, and modern SEO.
Please help us to maintain this collection by using reactions (👍, 👎) and comments to express your feelings.