Fix Google indexing: trim sitemap, noindex thin pages, regenerate blogs#31
Fix Google indexing: trim sitemap, noindex thin pages, regenerate blogs#31ayush-that wants to merge 1 commit intomainfrom
Conversation
- 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
There was a problem hiding this comment.
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/topiccontent - Added
robots: { index: false, follow: true }to filter/comparison pages - Updated
robots.txtrules 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/"], |
There was a problem hiding this comment.
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.
| disallow: ["/data/", "/api/", "/_next/static/", "/_next/data/"], | |
| disallow: ["/data/", "/api/", "/_next/data/"], |
| 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"; | ||
| } |
There was a problem hiding this comment.
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.
| if (Object.values(mapping).includes(char)) { | ||
| stack.push(char); | ||
| } else if (char in mapping) { |
There was a problem hiding this comment.
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).
| // Time: O(n) | Space: O(n) | ||
| public boolean isValidParentheses(String s) { | ||
| Stack<Character> stack = new Stack<>(); |
There was a problem hiding this comment.
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.
| // 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<>(); |
|
|
||
| public static int lcm(int a, int b) { | ||
| if (a == 0 || b == 0) return 0; | ||
| return Math.abs(a * b) / gcd(a, b); |
There was a problem hiding this comment.
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)).
| return Math.abs(a * b) / gcd(a, b); | |
| int g = gcd(a, b); | |
| return (int) Math.abs((long) a / g * b); |
| right = mid - 1; | ||
| public class BinarySearchTemplate { | ||
| // Generic binary search on answer space | ||
| public static int binarySearchOnAnswer(Predicate<Integer> condition, int left, int right) { |
There was a problem hiding this comment.
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.
| 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) { |
Deploying with
|
| 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 |
Summary
robots: { index: false, follow: true }to/company/[slug]/[filter]and/compare/[pair]pages/_next/static/and/_next/data/in robots.txtTest plan
bun run prebuildoutputs ~3,250 sitemap URLsnoindexin meta robots