0
0
SEO Fundamentalsknowledge~10 mins

Out-of-stock page handling in SEO Fundamentals - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the HTTP status for an out-of-stock page.

SEO Fundamentals
response.status_code = [1]
Drag options to blanks, or click blank then click option'
A404
B200
C301
D500
Attempts:
3 left
💡 Hint
Common Mistakes
Using 200 status code which means the page is OK even if the product is out of stock.
Using 301 which is for redirects, not for out-of-stock pages.
2fill in blank
medium

Complete the meta tag to tell search engines not to index an out-of-stock page.

SEO Fundamentals
<meta name="robots" content="[1]">
Drag options to blanks, or click blank then click option'
Aindex, follow
Bnoindex, nofollow
Cindex, nofollow
Dnoindex, follow
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'index, follow' which allows indexing and following links.
Using 'noindex, follow' which prevents indexing but allows following links.
3fill in blank
hard

Fix the error in the canonical link tag for an out-of-stock product page.

SEO Fundamentals
<link rel="canonical" href="[1]">
Drag options to blanks, or click blank then click option'
Ahttps://example.com/product-123
Bhttps://example.com/out-of-stock
Chttps://example.com/product-123?ref=outofstock
Dhttps://example.com
Attempts:
3 left
💡 Hint
Common Mistakes
Setting canonical to the out-of-stock page URL causing duplicate content.
Using URLs with query parameters that confuse search engines.
4fill in blank
hard

Fill both blanks to create a redirect for out-of-stock products to a category page.

SEO Fundamentals
if product.stock == 0:
    return redirect('[1]', code=[2])
Drag options to blanks, or click blank then click option'
A/category/outdoor
B301
C/category/electronics
D302
Attempts:
3 left
💡 Hint
Common Mistakes
Using 302 for permanent redirects which can confuse search engines.
Redirecting to unrelated categories causing poor user experience.
5fill in blank
hard

Fill all three blanks to create a JSON-LD structured data snippet indicating product availability.

SEO Fundamentals
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "[1]",
  "availability": "[2]",
  "url": "[3]"
}
Drag options to blanks, or click blank then click option'
AExample Product
Bhttps://schema.org/OutOfStock
Chttps://example.com/product-123
Dhttps://schema.org/InStock
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'InStock' availability when the product is out of stock.
Leaving the URL blank or incorrect.