Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Find Orphan Pages | Automating SEO Tasks with Python
Python for SEO Specialists

bookChallenge: Find Orphan Pages

Identifying orphan pagesβ€”pages on your website that are not linked to by any other pageβ€”is a crucial step in improving site structure and SEO. Orphan pages are often overlooked by both users and search engines, resulting in poor discoverability and lower rankings. By programmatically detecting these pages, you can ensure your site is fully interconnected and optimized for crawling.

Task

Swipe to start coding

Given a dictionary representing a website's internal link structure, return a list of orphan page namesβ€”pages that are not linked to by any other page.

  • The function receives site_structure, a dictionary where keys are page names and values are lists of linked page names.
  • Identify all pages that are present as keys in site_structure but do not appear in any of the values of site_structure.
  • Return a list of these orphan page names.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 7
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

How can I programmatically detect orphan pages on my website?

What tools or methods are best for finding orphan pages?

Can you explain why orphan pages negatively impact SEO?

close

bookChallenge: Find Orphan Pages

Swipe to show menu

Identifying orphan pagesβ€”pages on your website that are not linked to by any other pageβ€”is a crucial step in improving site structure and SEO. Orphan pages are often overlooked by both users and search engines, resulting in poor discoverability and lower rankings. By programmatically detecting these pages, you can ensure your site is fully interconnected and optimized for crawling.

Task

Swipe to start coding

Given a dictionary representing a website's internal link structure, return a list of orphan page namesβ€”pages that are not linked to by any other page.

  • The function receives site_structure, a dictionary where keys are page names and values are lists of linked page names.
  • Identify all pages that are present as keys in site_structure but do not appear in any of the values of site_structure.
  • Return a list of these orphan page names.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 7
single

single

some-alt