# Update annotations when a translation is removed

- Check 23.14 · Hreflang and regional variants · Critical
- Source: https://checklist-seo-geo.com/en/hreflang-regional-variants/update-annotations-when-translation-is-removed
- When a translation is removed, take it out of the other versions' hreflang annotations, the sitemap and the cache, and handle its old URL.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/hreflang-regional-variants/update-annotations-when-translation-is-removed.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

A translation disappears: page deleted, unpublished, set to `noindex`, language dropped or product withdrawn from a market. Its hreflang annotations must then disappear from every other version of the page, from the sitemap and from the caches, and its old URL must return a clear response (301 redirect or 404/410). Once the task is done, no annotation on the site points to a URL that does not return 200.

## Why it matters

hreflang annotations describe a group of equivalent pages. When a page leaves the group, all the others keep announcing it until someone changes them. Google asks that each pair of pages reference each other and ignores annotations without a return link: a deleted page no longer returns anything, so the annotation pointing to it becomes useless.

The problem is rarely visible. The remaining versions display normally, and Search Console has offered no hreflang report since the “International Targeting” report was retired in 2022. The symptoms show up later: crawlers following links to 404s or redirects, a sitemap announcing dead URLs, and sometimes an entire group misinterpreted because the `x-default` page was precisely the one that disappeared.

Removing a translation is also a moment when other things often break: the language switcher points to a 404, a redirect sends German visitors to a French page without warning, or the dropped language leaves orphaned internal links.

## What it improves

- **Valid hreflang groups**: all remaining annotations point to pages that return 200, are indexable and are reciprocal.
- **Crawling**: fewer crawler requests to redirects and 404s.
- **Visitor experience**: the language switcher no longer leads to an error page.
- **Reliable sitemap**: it lists only published URLs, which preserves its value as a signal.
- **Rankings**: no direct effect; above all, you prevent a group from being ignored or served incorrectly.

## How to check

Check the HTTP status code of every target announced by a page:

```bash
curl -s https://example.com/fr/tarifs/ \
  | grep -o '<link[^>]*hreflang[^>]*>' \
  | grep -o 'href="[^"]*"' | cut -d'"' -f2 \
  | while read -r url; do
      printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' "$url")" "$url"
    done
```

Expected result: only `200` lines. A `301`, `404` or `410` indicates an annotation to remove.

Across the whole site:

- **Screaming Frog**: crawl with hreflang crawling enabled, then the Hreflang tab, filters on non-200 hreflang URLs and missing return links.
- **Sitemap**: search the `xhtml:link` entries for URLs of the removed language or page.
- **Search Console**: the [Pages](https://search.google.com/search-console/index) report, filtered on the prefix of the language concerned; a sudden rise in “Not found (404)” or “Page with redirect” reveals annotations or links that were not updated.

> **Good to know:** always test after purging the cache, or by bypassing the CDN. A page served from the cache shows the old list even when the CMS has already been fixed.

## How to implement

### Before you start

Each removal calls for two decisions: what happens to the old URL, and what happens to the other versions.

**The old URL of the removed translation:**

| Situation | Response | Why |
|---|---|---|
| The content still exists in the same language under another URL | 301 to that URL | Preserves links and signals |
| The content no longer exists in this language but a close page does (category, parent page) | 301 to the close page in the same language | Avoids a dead end for the visitor |
| The entire language is dropped | 301 to the fallback version (often English or the language selection page), with a clear message | Visitors arrive from links and bookmarks |
| The content is deleted with no equivalent | 410 or 404 | A redirect to an unrelated page would be treated as a soft 404 |
| Translation temporarily withdrawn for review | Keep the URL offline as a 404 or leave the old version published | A long “temporary” redirect blurs the signals |

Do not automatically redirect to the same page in another language without the visitor knowing. See [plan for missing translations](https://checklist-seo-geo.com/en/international-architecture/plan-missing-translations).

**The other versions:**

1. Remove the annotation pointing to the removed URL from every remaining version.
2. If the removed URL carried the `x-default`, reassign the `x-default` to another version.
3. If only one version remains, remove all annotations: a one-page group makes no sense.
4. Remove the URL and its `xhtml:link` entries from the sitemap.
5. Fix the language switcher and internal links that pointed to it.
6. Purge the cache of every remaining version, not just the deleted page.

With properly built automatic generation (see [automate annotations through the CMS](https://checklist-seo-geo.com/en/hreflang-regional-variants/automate-annotations-through-cms)), points 1 to 5 happen on their own. Point 6 often remains manual: it is the most frequent cause of outdated annotations.

### Step 1 — List what is being removed

Before any deletion, record in a table the removed URL, the decision taken and the URLs of the group:

| Removed URL | Group (other versions) | Old URL response | New x-default | Cache purged | Checked on |
|---|---|---|---|---|---|
| `/it/prezzi/` | `/fr/tarifs/`, `/de/preise/`, `/en/pricing/` | 301 to `/it/` | unchanged (`/en/pricing/`) | yes | 2026-11-25 |
| `/en/pricing/` | `/fr/tarifs/`, `/de/preise/` | 301 to `/en/plans/` | `/fr/tarifs/` | yes | 2026-11-25 |

### Step 2 — Remove the translation in the CMS

Unpublish or delete the translation through the CMS, not by deleting a file or a database row: the CMS is what recalculates the groups.

### Step 3 — Respond on the old URL

Set up the redirect or the 410 according to the table above (examples by environment below).

### Step 4 — Purge and check

Purge the cache of every version in the group, rerun the command from the “How to check” section on each one, and check the sitemap.

### Apache

Versions: Apache 2.4.

In the `.htaccess` file at the root or in the virtual host:

```apache
RewriteEngine On

# Translation moved: 301 to the equivalent in the same language
RewriteRule ^en/pricing/?$ /en/plans/ [R=301,L]

# Italian language dropped: 301 to the fallback home page
RewriteRule ^it/ /en/ [R=301,L]

# Translation deleted with no equivalent: 410
RewriteRule ^de/aktion-2025/?$ - [G,L]
```

Reload with `sudo apachectl configtest && sudo systemctl reload apache2` if you change the virtual host.

### Nginx

Versions: Nginx 1.18 and later.

In the `server` block:

```nginx
location = /en/pricing/ {
    return 301 /en/plans/;
}

location ^~ /it/ {
    return 301 /en/;
}

location = /de/aktion-2025/ {
    return 410;
}
```

Reload with `sudo nginx -t && sudo systemctl reload nginx`. Then purge the Nginx page cache, if there is one (`fastcgi_cache` or `proxy_cache`), for the other versions in the group.

### Cloudflare

Versions: Cloudflare dashboard and API v4, all plans, November 2026.

For an entire language or a list of URLs, use Bulk Redirects or Redirect Rules, from the [Rules overview](https://dash.cloudflare.com/?to=/:account/:zone/rules/overview). Then purge the remaining versions by URL in [`Caching > Configuration`](https://dash.cloudflare.com/?to=/:account/:zone/caching/configuration), or through the API:

```bash
curl -X POST "https://api.cloudflare.com/client/v4/zones/ZONE_ID/purge_cache" \
  -H "Authorization: Bearer API_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"files":["https://example.com/fr/tarifs/","https://example.com/de/preise/","https://example.com/sitemap.xml"]}'
```

Without this purge, Cloudflare keeps serving cached HTML pages with the old list of annotations.

### AWS

Versions: CloudFront, console and AWS CLI v2, November 2026.

On CloudFront, invalidate every version in the group and the sitemap after the change:

```bash
aws cloudfront create-invalidation --distribution-id DISTRIBUTION_ID \
  --paths "/fr/tarifs/" "/de/preise/" "/sitemap.xml"
```

Redirects are set up on the origin or with a CloudFront Function on the viewer-request event.

### WordPress

Versions: WordPress 6.4 to 7.1, with WPML 4.5 and later or Polylang 3.0 and later.

- **WPML and Polylang**: deleting or unpublishing a translation removes it from the other versions' annotations and from the SEO plugin's sitemap. A translation moved to the trash is no longer published; still check that it has disappeared from the annotations.
- **Redirect**: set up the 301 with the Redirection plugin or with your SEO plugin's redirect feature (Rank Math and Yoast SEO Premium offer one).
- **Cache**: purge the entire page cache, not just the deleted URL. Plugins usually purge the modified page and the home page, rarely the other language versions.
- **Dropped language**: in WPML or Polylang, deleting a language removes its content; set up the redirects for all its URLs first.

### Shopify

Versions: Shopify admin, all plans, November 2026.

Removing a language from a market, unpublishing a language or removing a product from a market updates the tags Shopify generates. Create the URL redirects in the admin: `Content > Menus > View URL redirects > Create URL redirect`. If hreflang tags were added by hand in the theme, they do not follow: one more reason to delete them.

### Drupal

Versions: Drupal 10 and 11, with the contributed Redirect module (8.x-1.x branch).

With Content Translation, an unpublished translation no longer appears in the other versions' alternate tags. Delete the translation from the content's `Translate` tab, set up the redirect with the Redirect module, then clear the caches (`drush cr`) or, better, let cache tags invalidate the related pages.

### Laravel

Versions: Laravel 11 to 13, and Laravel 10 from 10.44, which introduced the `#[ObservedBy]` attribute.

Hook the update into the model lifecycle, so that every version in the group is purged and the sitemap is regenerated:

```php
// app/Observers/PageObserver.php
namespace App\Observers;

use App\Jobs\PurgePageCache;
use App\Jobs\RegenerateSitemaps;
use App\Models\Page;

class PageObserver
{
    public function updated(Page $page): void
    {
        if (! $page->wasChanged(['is_published', 'is_indexable', 'slug'])) {
            return;
        }

        $this->refreshTranslationGroup($page);
    }

    public function deleted(Page $page): void
    {
        $this->refreshTranslationGroup($page);
    }

    private function refreshTranslationGroup(Page $page): void
    {
        Page::query()
            ->where('translation_group', $page->translation_group)
            ->each(fn (Page $translation) => PurgePageCache::dispatch($translation));

        RegenerateSitemaps::dispatch();
    }
}
```

Register the observer with the `#[ObservedBy(PageObserver::class)]` attribute on the model. The `PurgePageCache` and `RegenerateSitemaps` jobs are yours to write, depending on your cache (Cloudflare, Varnish, response cache) and your sitemap generator.

### Next.js

Versions: Next.js 15 and 16 (App Router).

If the pages are static or regenerated (ISR), the deleted page disappears, but the other versions keep their old metadata until they are revalidated. In the CMS publishing webhook, revalidate the whole group:

```ts
// app/api/revalidate/route.ts
import { revalidatePath } from 'next/cache'
import { getTranslationGroupPaths } from '@/lib/cms'

export async function POST(request: Request) {
  const { groupId } = await request.json()
  const paths = await getTranslationGroupPaths(groupId)

  paths.forEach((path) => revalidatePath(path))
  revalidatePath('/sitemap.xml')

  return Response.json({ revalidated: paths.length })
}
```

Protect this route with a secret shared with the CMS. Permanent redirects are declared in `next.config.js` or `next.config.ts` (`redirects()` with `permanent: true`), or in the proxy (`proxy.ts`, named `middleware.ts` before Next.js 16).

## Common mistakes

- **Deleting the page without purging the other versions**: the CMS is up to date, but the cache keeps serving the old list for days.
- **Forgetting the `x-default`**: the removed version carried the `x-default`, and the whole group still announces it.
- **Redirecting to the language's home page**: for a page with no equivalent, Google may treat the redirect as a soft 404; a 410 is more honest.
- **Redirecting to another language without saying so**: the Italian visitor ends up on an English page without understanding why.
- **Leaving the annotation pointing to the redirect**: a 301 target is not a valid target, even if the destination is correct. See [exclude redirects and nonexistent pages](https://checklist-seo-geo.com/en/hreflang-regional-variants/exclude-redirects-nonexistent-pages).
- **Setting the translation to noindex while keeping the annotations**: a non-indexable target has no place in the group.
- **Hand-written annotations**: nobody thinks of changing the other versions.

## Frequently asked questions

### What should you do with the URL of a deleted translation?

Redirect it with a 301 to the closest equivalent in the same language if the content still exists elsewhere, or to a relevant parent page. If the content is deleted with no equivalent, return a 410 or a 404: a redirect to an unrelated page may be treated as a soft 404. In every case, remove this URL from the other versions' hreflang annotations and from the sitemap.

### Should you remove the hreflang annotation if the translated page redirects?

Yes. An hreflang annotation must point to the final URL, which returns 200 and whose canonical points to itself. A redirecting target is not valid, even if the destination is the right one: replace it with the destination URL if that is the exact equivalent in the same language, or remove the annotation if the destination is only a close page. Make the change on every version in the group.

### Does Search Console report hreflang errors?

No, not since 2022. Google retired the “International Targeting” report, which listed hreflang errors, while continuing to use the annotations. To spot an annotation pointing to a removed translation, crawl the site with a tool that reads hreflang, such as Screaming Frog, or check each target's HTTP status code with a script. A rise in 404s or redirects for one language in the Pages report is an indirect clue.

### What happens if only one version of a page remains?

Remove all its hreflang annotations. An hreflang group exists to choose between several versions; a single page that only points to itself gives the search engine no information. Keep its self-referencing canonical and its lang attribute. If a translation comes back later, automatic generation will recreate the group on every version at the same time.

## Resources

- [Google Search Central: tell Google about localized versions of your page](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=en)
- [Google Search Central: redirects and Google Search](https://developers.google.com/search/docs/crawling-indexing/301-redirects?hl=en)
- [Search Console Help: the International Targeting report is no longer available](https://support.google.com/webmasters/answer/12474899?hl=en)
- [Cloudflare: purge cache](https://developers.cloudflare.com/cache/how-to/purge-cache/)
- [Next.js: revalidatePath](https://nextjs.org/docs/app/api-reference/functions/revalidatePath)

Next steps: [Check that targets return HTTP 200](https://checklist-seo-geo.com/en/hreflang-regional-variants/check-that-targets-return-http-200), [Exclude unpublished or non-indexable translations](https://checklist-seo-geo.com/en/multilingual-indexing-sitemaps/exclude-unpublished-non-indexable-translations) and [Detect missing or outdated translations](https://checklist-seo-geo.com/en/multilingual-tracking-maintenance/detect-missing-outdated-translations).
