diff --git a/docs.json b/docs.json index 23027e304e..1c70ac2adb 100644 --- a/docs.json +++ b/docs.json @@ -29,6 +29,11 @@ "family": "Nunito Sans" } }, + "seo": { + "metatags": { + "canonical": "https://ngrok.com/docs" + } + }, "favicon": "favicon.ico", "logo": { "light": "/logo/light.svg", @@ -169,7 +174,7 @@ ] }, { - "group": "Examples", + "group": "Examples", "pages": [ "universal-gateway/examples", "universal-gateway/examples/front-door-pattern", diff --git a/redirect-to-ngrok.js b/redirect-to-ngrok.js new file mode 100644 index 0000000000..579e7318bd --- /dev/null +++ b/redirect-to-ngrok.js @@ -0,0 +1,20 @@ +// Redirect to ngrok.com domain if not already there +// This only runs in production (ngrok.mintlify.dev), not in preview/branch deployments +(function() { + var hostname = window.location.hostname; + + // Skip redirect if already on ngrok.com + if (hostname === 'ngrok.com') { + return; + } + + // Only redirect from the main production Mintlify domain + // Preview deployments have different hostnames and should not redirect + if (hostname !== 'ngrok.mintlify.dev') { + return; + } + + // Perform the redirect, preserving the path and search params + var newUrl = 'https://ngrok.com' + window.location.pathname + window.location.search + window.location.hash; + window.location.replace(newUrl); +})(); diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000000..1f53798bb4 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /