Skip to content

Fix Google indexing: trim sitemap, noindex thin pages, regenerate blogs#31

Open
ayush-that wants to merge 1 commit intomainfrom
fix/seo-indexing-improvements
Open

Fix Google indexing: trim sitemap, noindex thin pages, regenerate blogs#31
ayush-that wants to merge 1 commit intomainfrom
fix/seo-indexing-improvements

Conversation

@ayush-that
Copy link
Owner

Summary

  • Trim sitemap from 32,655 to ~3,250 URLs — removed filter, comparison, and blog pages to focus Google's crawl budget on core content
  • Added robots: { index: false, follow: true } to /company/[slug]/[filter] and /compare/[pair] pages
  • Blocked /_next/static/ and /_next/data/ in robots.txt
  • Regenerated all 5,463 blog posts with substantially improved prompts (richer code, complexity analysis, common mistakes, unique angles)

Test plan

  • Verify bun run prebuild outputs ~3,250 sitemap URLs
  • Verify filter/comparison pages return noindex in meta robots
  • Spot-check regenerated blog posts for improved content quality
  • Deploy and revalidate in Google Search Console

- Trim sitemap from 32,655 to ~3,250 URLs (remove filter, comparison,
  blog pages — keep company base, problem, topic, static pages only)
- Add robots noindex to /company/[slug]/[filter] and /compare/[pair]
- Block /_next/static/ and /_next/data/ in robots.txt
- Filter noindexed companies (<3 questions) from sitemap
- Remove redundant sitemap re-write in build script
- Improve blog generation prompts for substantially richer content
  (more code examples, complexity analysis, common mistakes, unique angles)
- Increase max_tokens from 4096 to 8192 for longer posts
- Regenerate all 5,463 blog posts with improved prompts
Copilot AI review requested due to automatic review settings March 10, 2026 09:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve Google indexing efficiency by reducing sitemap scope, applying noindex to thin/parameterized pages, tightening crawler access via robots rules, and regenerating blog content.

Changes:

  • Trimmed sitemap URL grouping to focus on core /company, /problem, and /topic content
  • Added robots: { index: false, follow: true } to filter/comparison pages
  • Updated robots.txt rules and regenerated many blog posts (content refresh + structure/code examples)

Reviewed changes

Copilot reviewed 74 out of 5488 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
content/blog/adobe-vs-airbnb-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/adobe-vs-accenture-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/adobe-two-pointers-interview-questions.md Expanded/rewrote content, added more code templates, updated frontmatter date
content/blog/adobe-medium-interview-questions-guide.md Expanded/rewrote content with templates/benchmarks, updated frontmatter date
content/blog/adobe-easy-interview-questions-guide.md Expanded/rewrote content with templates, updated frontmatter date
content/blog/adobe-binary-search-interview-questions.md Expanded/rewrote content with new examples/templates, updated frontmatter date
content/blog/accolite-math-interview-questions.md Expanded/rewrote content with new examples/templates, updated frontmatter date
content/blog/accolite-array-interview-questions.md Expanded/rewrote content with examples/templates, updated frontmatter date
content/blog/accenture-vs-yahoo-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-visa-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-twitter-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-snowflake-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-roblox-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-paypal-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-nutanix-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-morgan-stanley-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-jpmorgan-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-citadel-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-capital-one-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-bytedance-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-vs-airbnb-interview-comparison.md Regenerated blog post content and updated frontmatter date
content/blog/accenture-stack-interview-questions.md Expanded/rewrote content with templates, updated frontmatter date
content/blog/accenture-medium-interview-questions-guide.md Expanded/rewrote content with templates/benchmarks, updated frontmatter date
content/blog/accenture-math-interview-questions.md Expanded/rewrote content with templates/examples, updated frontmatter date
content/blog/accenture-hash-table-interview-questions.md Expanded/rewrote content with templates/examples, updated frontmatter date
content/blog/accenture-easy-interview-questions-guide.md Expanded/rewrote content with templates/examples, updated frontmatter date
content/blog/accenture-binary-search-interview-questions.md Expanded/rewrote content with templates/examples, updated frontmatter date
app/sitemap.ts Simplified sitemap grouping to reduce indexed URL count
app/robots.ts Updated robots disallow rules to block Next.js internals
app/compare/[pair]/page.tsx Added noindex robots metadata for comparison pages
app/company/[slug]/[filter]/page.tsx Added noindex robots metadata for filtered company pages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

userAgent: "*",
allow: "/",
disallow: ["/data/", "/api/"],
disallow: ["/data/", "/api/", "/_next/static/", "/_next/data/"],
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking /_next/static/ can prevent Google from fetching JS/CSS resources needed to render pages, which may hurt indexing and rendered-content evaluation. Common practice is to allow /_next/static/ (and only disallow truly non-public endpoints), while optionally disallowing /_next/data/ if you have a specific reason.

Suggested change
disallow: ["/data/", "/api/", "/_next/static/", "/_next/data/"],
disallow: ["/data/", "/api/", "/_next/data/"],

Copilot uses AI. Check for mistakes.
Comment on lines 13 to 18
function classifyUrl(urlPath: string): SitemapGroup {
if (urlPath.startsWith("/company/")) return "company";
if (urlPath.startsWith("/problem/")) return "problem";
if (urlPath.startsWith("/topic/")) return "topic";
if (urlPath.startsWith("/blog")) return "blog";
if (
urlPath === "/" ||
urlPath === "/dashboard" ||
urlPath === "/companies" ||
urlPath === "/podcast" ||
urlPath.startsWith("/difficulty/") ||
urlPath.startsWith("/system-design")
)
return "static";
return "other";
return "static";
}
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With /blog (and other non-core routes like /compare) no longer classified separately, any such paths that still make it into the candidate URL list will now be grouped under static. If the trimming logic relies on grouping to exclude sections, this change can unintentionally keep excluded routes in the sitemap. Consider explicitly classifying routes you intend to exclude (e.g., return \"blog\"/\"compare\") and filtering them out, or filtering before classification.

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +53
if (Object.values(mapping).includes(char)) {
stack.push(char);
} else if (char in mapping) {
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object.values(mapping).includes(char) allocates an array and does a linear scan on every character, making the loop unnecessarily expensive. Prefer a constant-time check (e.g., precompute a Set of opening brackets once, or invert the mapping so opening vs closing can be checked without rebuilding values each iteration).

Copilot uses AI. Check for mistakes.
Comment on lines +65 to +67
// Time: O(n) | Space: O(n)
public boolean isValidParentheses(String s) {
Stack<Character> stack = new Stack<>();
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java.util.Stack is a legacy synchronized type; modern Java guidance is to use Deque (e.g., ArrayDeque) for stack behavior (push/pop/peek). This improves performance and aligns with current best practices.

Suggested change
// Time: O(n) | Space: O(n)
public boolean isValidParentheses(String s) {
Stack<Character> stack = new Stack<>();
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
// Time: O(n) | Space: O(n)
public boolean isValidParentheses(String s) {
Deque<Character> stack = new ArrayDeque<>();

Copilot uses AI. Check for mistakes.

public static int lcm(int a, int b) {
if (a == 0 || b == 0) return 0;
return Math.abs(a * b) / gcd(a, b);
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Math.abs(a * b) can overflow int before the division, producing incorrect LCMs for moderately large inputs. Use long for intermediate multiplication and/or divide before multiply (e.g., Math.abs((long)a / gcd(a,b) * b)).

Suggested change
return Math.abs(a * b) / gcd(a, b);
int g = gcd(a, b);
return (int) Math.abs((long) a / g * b);

Copilot uses AI. Check for mistakes.
right = mid - 1;
public class BinarySearchTemplate {
// Generic binary search on answer space
public static int binarySearchOnAnswer(Predicate<Integer> condition, int left, int right) {
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Java snippet uses Predicate<Integer> in the method signature but doesn't show an import for it (and later uses java.util.function.Predicate fully-qualified in another place). For consistency and copy/paste usability, either import java.util.function.Predicate at the top or fully-qualify Predicate in the signature.

Suggested change
public static int binarySearchOnAnswer(Predicate<Integer> condition, int left, int right) {
public static int binarySearchOnAnswer(java.util.function.Predicate<Integer> condition, int left, int right) {

Copilot uses AI. Check for mistakes.
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
codejeet 22303f5 Commit Preview URL

Branch Preview URL
Mar 10 2026, 09:15 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants