DEV Community

Ujjwal Dubey
Ujjwal Dubey

Posted on

When the Title, Meta Description, OG Tags and H1 Disagree: A Ten-Line Brand Consistency Check

Answer engines and link previews read four places before your actual content: the <title>, the meta description, the Open Graph tags and the first <h1>. When those four say different things, your brand looks confused before anyone reads a paragraph.

This is one of the first things I check, and it complements a free AI website brand audit tool reading the same public page: the tool describes tone; this check catches the plain disagreements.

The check

import requests
from bs4 import BeautifulSoup

def signals(url):
    s = BeautifulSoup(requests.get(url, timeout=20).text, 'html.parser')
    m = lambda **a: (s.find('meta', attrs=a) or {}).get('content', '')
    return {
        'title': s.title.get_text(strip=True) if s.title else '',
        'description': m(name='description'),
        'og:title': m(property='og:title'),
        'og:description': m(property='og:description'),
        'h1': (s.find('h1').get_text(' ', strip=True) if s.find('h1') else ''),
    }

for k, v in signals('https://example.com').items():
    print(f'{k:15} {v[:110]}')
Enter fullscreen mode Exit fullscreen mode

What to look for

  • Empty fields. An empty h1 in raw HTML usually means client-side rendering. Many crawlers will not see your headline.
  • Old copy. A meta description from a previous positioning is very common after a redesign. The page says one thing; the search snippet says another.
  • Different audiences. Title for enterprises, H1 for small businesses. Pick one.
  • Different offers. OG description mentions a service you no longer lead with.

Fixing it

Write one sentence that says what you do and for whom. Then derive all four from it:

  • title: the short version plus brand name
  • meta description: the full sentence plus one proof point you can stand behind
  • og:title / og:description: same as above, unless you have a reason
  • h1: the customer-facing version of the sentence

Re-run the check. Re-run the brand audit. The two together usually show a clear improvement in how consistently the page introduces itself.

See the other no-login War Room checks.

I run NxFlowAI (Mumbai). Code is illustrative.

Top comments (0)