Guide

Subdomain takeover. How an old address can be taken over

An old campaign page, a test shop or a support portal you have shut down can leave an address behind. If it still points to the service you left, someone else can take it over and publish their own content under your name. This is called a subdomain takeover.

By Erik Lindqvist, WebbLarm · 30 November 2026 · 6 min read

Short answer

A subdomain is an address placed in front of your domain name, for example campaign.company.com. It often points to a service outside your own website: a page builder, a shop platform or a support system.

When you cancel the service, the pointer often stays at your domain provider. Then someone else can open an account with the same service, claim the free name and put anything they like on campaign.company.com. The visitor sees your address and trusts it.

The fix is simple: remove the pointer. The hard part is knowing which pointers exist, because many were created years ago by someone who no longer works for you.

How it happens, step by step

  1. A company starts a campaign page with an external service and wants it to live at campaign.company.com.
  2. Someone adds a pointer in the domain’s DNS, usually a so-called CNAME record. It says: “this address lives at the service over there”.
  3. The campaign ends. The account with the service is cancelled, but nobody thinks about the pointer.
  4. The address now points to a name that is free at the service.
  5. An attacker creates their own account there, requests the free name and gets it. From that moment the attacker controls what is shown on your subdomain.

Nobody has broken into your systems, and no password has leaked. That is why it does not show up in any logs on your own website.

Not every service can be abused like this. Some providers now require anyone who wants to use an address to first prove that they own the domain. But far from all do, and you rarely know which rules applied when the pointer was added.

What can someone do with your subdomain?

Microsoft describes the risks in its documentation on dangling DNS records. Whoever takes over the address can:

  • publish their own content under your name, for example a fake login page or a page that asks for card details
  • use the address in phishing, where the link in the email goes to a real address under your domain
  • in some cases read cookies from visitors who are logged in to your main site, if the cookies apply to the whole domain

The attacker can often also get a valid certificate for the address, because whoever controls the content also passes the certificate authority’s check. So the padlock in the browser shows up as normal.

The most common outcome is more everyday: gambling ads, junk pages or links to dubious shops that appear in search results with your company name in the address. This damages trust and can pull down the reputation of your whole domain with search engines.

Where do the dangling addresses usually come from?

Common sources of subdomains that get left behind
Type of serviceWhat the address may look likeWhy the pointer stays
Campaign page or page buildercampaign.company.comThe campaign was temporary and the agency that built it has left the assignment
Shop platformshop.company.com, store.company.comThe shop moved to another platform and the old one was cancelled
Support system or knowledge basesupport.company.com, help.company.comThe company changed systems and the old portal was closed
Test and development environmenttest.company.com, dev.company.comThe project finished and the cloud server was removed
Blog, status page or booking systemblog.company.com, status.company.comThe service was used for a while and then forgotten

What they have in common is that the service was ended in one place and the pointer was left in another. Two different logins, often two different people.

How to check yourself

You need the login for your domain provider, meaning the company where the domain name is registered or where DNS is managed.

  1. Open the DNS settings and look at all the records, especially those called CNAME.
  2. Write down every subdomain and where it points.
  3. Open each address in a browser. If it shows a page you recognise and still use, all is well.
  4. Watch for error pages from an external service, such as “this page does not exist” or “no account is linked to this address”. That is the warning sign.
  5. For each record, ask: do we still use this service? Who holds the account?

One weakness of this method is that you only see the records at the provider you log in to. If the company has several domains, or DNS has been moved at some point, there may be records you do not find. Subdomains can also be found from the outside, including in the public logs of issued certificates. That is how attackers look for them.

How to close the gap

Remove the pointer. If you no longer use the service, the DNS record should go. It takes a minute and costs nothing.

Or take the name back. If the address should stay alive, log in to the service and link the address to your account again, so the name is no longer free.

Do it in the right order next time. When a service is to be ended: remove the DNS record first, then cancel the account. Microsoft advises companies to make removing the DNS record a fixed item on the checklist every time a service is shut down.

Keep a list. A simple spreadsheet with every subdomain, what it is used for and who is responsible goes a long way. Review it a couple of times a year, and always when you change web agency or platform.

If the address has already been taken over, the first step is the same: remove the pointer, and the attacker’s page disappears from your domain. If the page has collected details from your customers, you also need to find out what happened and who is affected.

Is this part of a normal security review?

Yes. OWASP, the non-profit organisation behind the most widely used testing methods for web security, has a dedicated test for subdomain takeover in its testing guide. Anyone who reviews a website properly should look at the subdomains.

At WebbLarm it is included. We look for addresses that point to services you no longer use and that someone else can take over, together with everything else that is visible from the outside.

  • A free check costs 0 SEK and gives you the most important findings in an email within 1 to 24 hours.
  • The report costs 950 SEK excl. VAT and goes through all 27 checkpoints in plain language.
  • Remediation costs from 5 500 SEK excl. VAT. We close the gaps for you. If you have bought the report in the last 14 days, its price is deducted, so the price becomes from 4 550 SEK.
  • Monitoring costs 799 SEK/month excl. VAT and checks every night.

Frequently asked questions

What is a subdomain takeover?

It is when an outsider takes control of one of your subdomains. This becomes possible when the address points to an external service where your account has been ended, so that the name can be registered by anyone.

How do I know if we have a subdomain that can be hijacked?

Go through the DNS records at your domain provider and open each subdomain in a browser. An error page from an external service that you no longer use is a warning sign. A review from the outside also finds addresses you have forgotten yourselves.

Is it enough to cancel the service?

No. It is the cancellation that creates the gap. The pointer in DNS must also be removed, preferably before the account is closed.

Can a hijacked subdomain be used for fake emails?

It can be used in phishing, by making the links in the emails go to an address under your domain. Protection against emails sent in your name is a separate matter and is handled by SPF, DKIM and DMARC. Both need to be in order.

Does it cost anything to fix?

Removing a DNS record is free and quick if you have the login. The cost lies in finding the records and knowing which ones are safe to remove.

Check if you have addresses that can be taken over

Enter the address and your email. The result arrives by email within five minutes.

By email within five minutes: what anyone can see from the outside about HTTPS, email protection, server and plugins, and what is still hidden. Free.

0 SEK · public information only

By sending you confirm that you represent the website. We only use your address to reply. Privacy policy (Swedish).