Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/docs-ophis/static/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
# /api was a dead path (404). The Intent API reference lives at /intent-api.
/api /intent-api 301
/api/ /intent-api 301

# /institutional and /brand are NOT docs pages: they are swap-app HashRouter
# routes (swap.ophis.fi/#/institutional, /#/brand). Google indexed stale
# docs.ophis.fi/{institutional,brand} URLs from old links and flagged them 404
# (GSC, 2026-06). 301 them to their real homes on the swap app. (If CF drops the
# fragment, the target still resolves to the live swap home, so never a 404.)
/institutional https://swap.ophis.fi/#/institutional 301

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Point /institutional at the business host

The current swap app no longer owns /institutional: RoutesApp.tsx redirects that route to https://business.ophis.fi in a client-side useEffect. Sending the docs 301 to https://swap.ophis.fi/#/institutional therefore makes crawlers land on the SPA shell and only reach the real page if they execute JavaScript, while non-JS clients see the wrong destination; redirect this stale docs URL directly to the business host instead.

Useful? React with 👍 / 👎.

/brand https://swap.ophis.fi/#/brand 301
Comment on lines +13 to +14

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Redirect the trailing-slash stale paths too

If crawlers or old links request docs.ophis.fi/institutional/ or docs.ophis.fi/brand/, these exact-source rules only cover the no-slash paths, so the slash variants continue to fall through to the docs 404. The existing /api fix above handles both forms, and Cloudflare Pages treats /trailing and /trailing/ as distinct redirect sources, so add the trailing-slash rules for these two stale product routes as well.

Useful? React with 👍 / 👎.

13 changes: 13 additions & 0 deletions apps/rebate-indexer/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ export async function buildApiServer(): Promise<FastifyInstance> {
});
app.options('*', async (_req, reply) => reply.code(204).send());

// rebates.ophis.fi is the rebate-indexer API host (JSON endpoints + the
// per-wallet /tier HTML page). None of it is meant for search indexing, and
// Google was crawling the bare host root and flagging it 404 (GSC, 2026-06).
// Tell crawlers to stay off the whole host. Permissive rate limit: robots.txt
// is fetched freely by crawlers and is harmless.
app.get('/robots.txt', {
config: {
rateLimit: { max: 200, timeWindow: '1 minute' },
},
}, async (_req, reply) =>
reply.code(200).type('text/plain; charset=utf-8').send('User-agent: *\nDisallow: /\n'),
Comment on lines +163 to +168

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return a non-404 response for the rebates root

When Google rechecks the flagged URL https://rebates.ophis.fi/, this change only serves /robots.txt; the root path itself still falls through to the existing not-found handler and returns 404. That means the GSC “Not found (404)” item for the bare host is not actually resolved by this route (and Disallow: / can also prevent crawlers from seeing any future fix on /). Add a GET / response or redirect/noindex page so the exact reported URL stops returning 404.

Useful? React with 👍 / 👎.

);

app.get('/health', {
config: {
rateLimit: { max: 200, timeWindow: '1 minute' }, // permissive — uptime monitors hit this continuously
Expand Down
Loading