chore(netlify): fix canonical redirect to point to custom domain#312
chore(netlify): fix canonical redirect to point to custom domain#312itvi-1234 wants to merge 1 commit into
Conversation
✅ Deploy Preview for kmesh-net ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request updates the redirection configuration in netlify.toml to redirect traffic from the Netlify staging domain to the canonical kmesh.net domain using a 301 permanent redirect. A review comment suggests moving this redirect rule to the top of the file to ensure it is processed before other rules, which is necessary to correctly enforce the canonical domain and prevent SEO duplicate content issues.
There was a problem hiding this comment.
Pull request overview
This PR updates Netlify redirect configuration to ensure the Netlify staging subdomain (kmesh-net.netlify.app) permanently redirects to the canonical custom domain (kmesh.net) to avoid backwards redirects and reduce SEO duplicate-content risk.
Changes:
- Reversed the canonical redirect to send
kmesh-net.netlify.app/*traffic tokmesh.net/:splat. - Updated the redirect status from a rewrite (
200) to a permanent redirect (301).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: itvi-1234 <rjsumit71@gmail.com>
d85327c to
79b8b6d
Compare
|
/cc @yashisrani |
|
/lgtm |
Description
This PR resolves a backwards-redirect rule inside
netlify.tomlwhere our official premium custom domain (kmesh.net) was mapped to redirect/proxy to our Netlify staging subdomain (kmesh-net.netlify.app).The Problem:
https://kmesh.netwere routed internally via a200rewrite status tohttps://kmesh-net.netlify.app.*.netlify.app) and the official custom domain without a proper301canonical link consolidated mapping, Google and Bing indexers flag both domains for duplicate content. This splits our Domain Authority and organically de-ranks Kmesh in organic search results.The Solution:
We reversed the redirection logic to follow the recommended industry standard for Netlify-deployed custom domains:
https://kmesh-net.netlify.app/*to the canonical domainhttps://kmesh.net/:splat.301: Swapped200(rewrite) to301(Permanent Redirect). This explicitly instructs search engine indexers that the staging subdomain has permanently shifted authority to the custom domain, consolidating all PageRank value.:splatsupport: Ensures any sub-route visited on the staging app (e.g./docs/welcome) cleanly redirects to the corresponding sub-route on the official domain, preventing any potential404errors.