Enriching DNS, proxy and firewall logs with website categories
Network logs hold millions of hostnames and very little meaning. Joining them to a website category database turns raw names into answers about what kinds of services people and systems actually reach.
This guide is for analytics, data and SIEM teams: which fields to use, how to normalize names, where to join, what to watch on privacy and which reports pay off first.
Questions enrichment lets you answer
Without categories, every report becomes a long list of hostnames that someone must read. With categories, the same logs answer business and security questions in one query.
Which kinds of services are used?
Traffic and users per category, by site, department or device group.
Which AI tools are in use?
Our AI tools set covers 11,800+ AI-tool domains in 18 categories and 165 subcategories, updated daily.
Where are the risky destinations?
Hits on malware, anonymizers, remote access tools and newly registered domains.
Does policy match reality?
Traffic to categories your policy blocks or warns on, and from where.
Which services drive bandwidth?
Volume by category, such as streaming, file hosting and software updates.
What is just background?
Separate infrastructure, telemetry and update traffic from what users choose to visit.
Where do destinations sit?
Group traffic by the country attributed to each site, useful for data transfer reviews and unexpected regional services.
What changed this month?
Compare category shares month on month to spot new services, a shift to streaming or a sudden rise in uncategorized names.
Which rules would a new policy hit?
Before blocking a category, count the traffic and groups it would affect, so the change does not surprise anyone.
Which logs to enrich, and where the domain lives
Each log type records the destination differently. Find the field that holds a hostname, because that is what you join on.
| Log source | Field with the destination | Notes |
|---|---|---|
| DNS resolver logs | Query name, such as qname | The cleanest source. Covers every device that uses your resolvers, including non-browser traffic. |
| Web proxy and gateway logs | Host or full URL | Host is enough for a domain join. URL paths add detail but also more personal data. |
| Firewall logs | TLS server name or HTTP host, when recorded | Logs with only IP addresses cannot be joined directly. See the section on IP-only logs below. |
| Email security logs | Link and sender domains | Useful for phishing trends and reported message triage. |
| Endpoint telemetry | Remote hostname per connection | Ties traffic to a process, which helps separate apps from browsing. |
| Cloud access logs | Service or app domain | Adds visibility for remote staff who bypass the office network. |
IP-only firewall logs: one IP address can host thousands of sites, so an IP cannot be categorized reliably. Join DNS answers from the same client and time window to recover the hostname, or turn on server name logging where your firewall supports it.
Step 1: normalize every hostname
Most failed joins come from small formatting differences. Clean every name the same way before you look it up, and keep the original next to it for audit.
Match order that works
- Try the full hostname first, for services that live on their own subdomain.
- Fall back to the registered domain, found with the public suffix list.
- Mark anything still unmatched as uncategorized, never as safe.
Why the public suffix list matters
- Endings like
co.ukorcom.auhave two parts. - Cutting at the last dot gives wrong domains such as
co.uk. - The list also covers many hosting platforms where each customer has a subdomain.
Step 2: choose where the join happens
There are three common places to join logs to categories. Each trades freshness, speed and storage in a different way, and many teams combine two of them.
At ingest, in the pipeline
- Category added as each event arrives.
- Fastest queries and dashboards.
- Keeps the category valid on the day of the event.
- Needs the lookup table loaded in the pipeline.
At query time, in the SIEM
- Category looked up from a table when you search.
- Always uses the newest data.
- No extra storage on every event.
- Slower on very large searches.
In batch, in the warehouse
- Daily or hourly jobs join logs to the database file.
- Best for long term trends and reporting.
- Easy to re-run when the data refreshes.
- Not suited to real time alerts.
For delivery choices, compare URL categorization API vs database. File layouts are in domain list download formats and the data dictionary.
Step 3: a batch join in SQL
This example shows the warehouse pattern. Join distinct domains first, because a day of logs usually holds far fewer distinct names than events, then attach results back to the events.
/* 1. distinct normalized domains from yesterday's DNS logs */ WITH d AS ( SELECT DISTINCT registered_domain FROM dns_logs WHERE event_date = CURRENT_DATE - 1 ), /* 2. look each one up once in the category table */ c AS ( SELECT d.registered_domain, cat.primary_category, cat.country, cat.popularity_band FROM d LEFT JOIN url_categories cat ON cat.domain = d.registered_domain ) /* 3. traffic per category, uncategorized kept visible */ SELECT COALESCE(c.primary_category, 'Uncategorized') AS category, COUNT(*) AS queries, COUNT(DISTINCT l.client_group) AS groups FROM dns_logs l JOIN c ON c.registered_domain = l.registered_domain WHERE l.event_date = CURRENT_DATE - 1 GROUP BY 1 ORDER BY queries DESC;
Use a left join
Keep events without a match so you can measure coverage and find gaps.
Group, not user
Report by department or device group by default. It answers most questions with less personal data.
Load deltas daily
Apply the daily file of new and changed domains so fresh names get a category quickly.
Partition by date
Store enriched tables by day, so a refresh can be re-applied to recent days without touching older history.
Fields worth adding to every event
Keep the enrichment small. A handful of fields covers nearly every report and alert, and keeps storage and dashboards readable.
| Field | Example | What it is used for |
|---|---|---|
| Primary category | Cloud Storage / File Hosting | Main grouping for reports, alerts and policy checks. |
| Secondary categories | Web-based Applications | Context for sites with several purposes. |
| IAB content category | Technology and computing | Finer topics for analytics outside security. |
| AI tool category | One of 18 AI categories | Detail on AI usage for governance reports. |
| Country | Attributed market | Spot destinations in unexpected regions. |
| Popularity band | Top 10,000 | Separate mainstream services from rare names. |
| Category data date | 2026-10-01 | Shows which refresh the label came from. |
Reports and alerts that pay off first
Start with a few reports that answer questions people already ask. These examples use DNS or proxy logs joined to the category table.
| Report or alert | Logic | Who uses it |
|---|---|---|
| Category mix by site | Share of traffic per category for each office or network segment. | IT and network teams |
| AI tools in use | Distinct AI / LLM Tools domains and groups using them, week by week. | Governance and security |
| Unapproved storage | Cloud Storage / File Hosting outside the approved list, by volume. | Data protection teams |
| Anonymizer hits | VPN / Proxy / Anonymizers on managed devices. | Security operations |
| Fresh and rare | Domains first seen recently with no popularity band. | Threat hunters |
| Policy gaps | Categories that policy blocks but still appear in logs. | Network and policy owners |
| Coverage check | Share of events with a category, and top uncategorized names. | The data team itself |
Worked example: the file storage question
Where does company data go?
The data protection officer asks which file storage services staff use besides the approved one. Nobody can answer from hostnames alone.
Filter by category
A month of proxy logs is joined to the category table and filtered to Cloud Storage / File Hosting and File Sharing/P2P.
A short, readable list
The report shows a handful of unapproved services, with traffic volume and the departments using them, not individual names.
A policy decision
Two services are approved for partner work, the rest get a warning page, and the report becomes a monthly routine.
Security specific uses are covered in domain categorization for cybersecurity, DNS filtering and security and enterprise network security.
Privacy: enrich without over-collecting
Logs that link destinations to a user, device or IP address can be personal data under laws such as the GDPR. Category enrichment can actually reduce exposure, because many questions can be answered by category and group.
Clear purpose
Write down why logs are enriched, such as security and capacity planning, and use them only for that.
Aggregate first
Default reports to category and group level. Drill down to a person only with a reason and approval.
Pseudonymize
Replace user names with stable tokens in analytics tables, with re-identification kept to a small group.
Short retention
Keep detailed logs only as long as needed and keep longer trends as aggregates.
Keep data inside
A local database means no domain from your logs is sent to an outside service for lookup.
Tell people
Staff notices and, in some countries, works council agreements may apply. Check local law.
Sensitive categories: visits to health, religion or political sites can reveal special category data about a person, so many teams exclude these categories from user level reports altogether. See also privacy compliance and GDPR.
Pitfalls that skew the numbers
Raw counts from network logs can mislead. These effects are the usual reasons a first dashboard looks wrong.
Machine traffic dominates
Updates, telemetry and certificate checks create huge volumes. Separate them before measuring user behaviour.
Shared platforms
CDN and hosting domains serve many sites. Read them as infrastructure, not as a choice someone made.
DNS caching hides repeats
Resolvers and clients cache answers, so DNS counts are not page views. Compare trends, not absolute numbers.
Encrypted DNS bypasses
Devices using their own encrypted DNS do not show up in resolver logs. Check coverage per device group.
Large multi-purpose sites
A single domain can host video, shopping and messaging. Categories are ranked, so read secondary ones too.
Generated names
Malware that creates random domain names produces many unmatched names. Treat bursts of these as a signal in their own right.
Keeping enrichment fresh
Category data changes as sites launch, change and close. A simple update routine keeps your labels close to the current web.
Daily
- Load the delta file with about 300,000 newly registered domains categorized each day.
- Re-run joins for uncategorized names from the last few days.
- Alert if the delta file is missing or much smaller than usual.
Monthly
- Load the monthly refresh of the full database of over 120 million domains.
- Record the data date on each enriched event or table.
- Review coverage and the top uncategorized names.
Refresh cycles are explained in coverage and freshness, and setup steps are in the integration guide.
A four-week rollout plan
Teams that start small and prove value quickly tend to keep the project funded. This plan gets from a raw log table to useful reports within a month.
Load and normalize
Load the category file into the warehouse or SIEM lookup store. Build the hostname cleaning step and test it on one day of DNS logs.
Measure coverage
Run the join, measure the share of events and distinct names with a category, and review the top uncategorized names by hand.
First reports
Publish the category mix, AI tools in use and unapproved storage reports to a small group of stakeholders.
Alerts and routine
Add two or three category based alerts, schedule daily delta loads and write down the privacy rules for drill-down.
| Health metric | What to watch | Typical action |
|---|---|---|
| Event coverage | Share of log events whose domain has a category. | Investigate a sudden drop, often a parsing change. |
| Distinct name coverage | Share of distinct domains with a category. | Lower than event coverage is normal, because rare names are many. |
| Top uncategorized | The most frequent names without a match. | Check normalization first, then internal names. |
| Data date | Age of the category file in use. | Alert if the monthly refresh or daily delta did not load. |
Quick glossary
Short definitions for terms used in this guide, useful when you explain the project to privacy, legal or management colleagues.
Enrichment
Adding context fields, such as category or country, to raw log records.
SIEM
Security information and event management: the platform that collects, searches and alerts on logs.
Registered domain
The part of a hostname bought from a registrar, such as example.co.uk.
Public suffix list
A shared list of endings under which people can register names, used to find the registered domain.
Server name indication
The hostname a client sends at the start of a TLS connection, which some firewalls log.
Pseudonymization
Replacing names with tokens so data can be analysed without showing who is who.
Frequently asked questions
What does it mean to enrich logs with website categories?
Adding a category, and often country and popularity, to every domain in DNS, proxy or firewall logs. Analysts then report on kinds of destinations instead of raw hostnames.
Should I enrich at ingest time or at query time?
Ingest is fastest to query and keeps the category valid on the day of the event, while query time always uses the newest data. Many teams do both.
How do I match a hostname like cdn.shop.example.co.uk to a category?
Normalize it, try the full hostname, then fall back to the registered domain found with the public suffix list. Here that is example.co.uk.
Are browsing logs personal data?
Often, yes, when they link domains to a user, device or IP address. Limit access and retention, report by category or group where you can, and check local law.
Can firewall logs with only IP addresses be categorized?
Not reliably, because one IP can host thousands of sites. Use server name fields where recorded, or correlate with DNS logs from the same client and time.
Does enrichment send our domains to an outside service?
Not with a local database, because the files run inside your own systems. A lookup API is also included with licences for single checks.
Give every hostname in your logs a meaning
Over 120 million categorized domains plus daily deltas, as CSV, Parquet or JSON files that run in your own warehouse, pipeline or SIEM. A lookup API is included with licences.