Search Engine Optimization (SEO)

Search Engine Optimization (SEO)

One-liner: The practice of improving a website's visibility and ranking in search engine results through technical and content optimization.

🎯 What Is It?

Search Engine Optimization (SEO) is the process of enhancing a website's structure, content, and technical implementation to rank higher in search engine results pages (SERPs). SEO makes sites more attractive to search engine crawlers and improves discoverability for users.

🔬 How It Works

Ranking Factors

Search engines use complex algorithms to score and rank websites. Key factors include:

Factor Description Impact
Keywords Relevant terms in content High
Backlinks Links from other sites High
Page Speed Load time performance Medium
Mobile-Friendly Responsive design High
HTTPS Secure connection Medium
Content Quality Original, useful content High
User Experience Easy navigation, low bounce rate Medium
Sitemap XML sitemap for crawlers Medium
robots.txt Proper crawler directives Low

SEO Categories

1. On-Page SEO

2. Technical SEO

3. Off-Page SEO

📊 SEO Tools & Metrics

Tool Purpose
Google Search Console Monitor search performance, indexing
Google PageSpeed Insights Analyze site speed & performance
Ahrefs / SEMrush Backlink analysis, keyword research
Screaming Frog Technical SEO audits
Lighthouse Performance, accessibility, SEO audit

Key Metrics

🚨 Black Hat vs White Hat SEO

✅ White Hat (Legitimate)

❌ Black Hat (Manipulative)

Consequence: Search engines penalize or ban sites using black hat techniques.

🛡️ Security & SEO

SEO Poisoning (Attacker Technique)

Attackers compromise websites to inject malicious content with high SEO value:

1. Hack vulnerable WordPress site
2. Create hidden pages with trending keywords
3. Optimize for search engines
4. Redirect visitors to phishing/malware sites
5. Site ranks for popular terms → drives traffic to attacker

Detection:

Common SEO Vulnerabilities

🎤 Interview Questions

🎤 Interview STAR Example

Situation: Company's blog was compromised. Attacker injected 500+ hidden pages optimized for trending keywords, linking to pharma spam.
Task: Investigate SEO poisoning attack and remediate as SOC analyst.
Action: Used Google Search Console to identify unauthorized indexed pages. Found exploit via outdated WordPress plugin. Removed malicious pages, patched vulnerability, requested Google to de-index spam URLs.
Result: Malicious pages removed from search results within 1 week. Implemented WAF rules and plugin update policy to prevent recurrence.

✅ Best Practices

📚 References