{"record":{"id":"7e78342cde5a9144","repo":"n8n-io/n8n","slug":"redirect-from-new-url-input-url-hostname-to","errorCode":null,"errorMessage":"Redirect from ${new URL(input.url).hostname} to ${new URL(targetUrl).hostname} is not allowed. Skip this URL and try a different research strategy — retrying the same URL will not help.","messagePattern":"Redirect from (.+?) to (.+?) is not allowed\\. Skip this URL and try a different research strategy — retrying the same URL will not help\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/src/tools/research.tool.ts","lineNumber":232,"sourceCode":"\t\t\t};\n\t\t}\n\t}\n\n\t// ── Execute fetch ──────────────────────────────────────────────\n\n\tconst authorizeUrl = async (targetUrl: string) => {\n\t\tconst redirectCheck = checkDomainAccess({\n\t\t\turl: targetUrl,\n\t\t\ttracker: context.domainAccessTracker,\n\t\t\tpermissionMode: context.permissions?.fetchUrl,\n\t\t\trunId: context.runId,\n\t\t});\n\t\tif (redirectCheck.allowed) return;\n\t\tif (redirectCheck.blocked) {\n\t\t\tthrow new Error(`Access to ${new URL(targetUrl).hostname} is blocked by admin.`);\n\t\t}\n\t\tif (await isSameRegistrableDomainOverHttps(input.url, targetUrl)) return;\n\t\tthrow new Error(\n\t\t\t`Redirect from ${new URL(input.url).hostname} to ${new URL(targetUrl).hostname} is not allowed. ` +\n\t\t\t\t'Skip this URL and try a different research strategy — retrying the same URL will not help.',\n\t\t);\n\t};\n\n\tconst result = await context.webResearchService.fetchUrl(input.url, {\n\t\tmaxContentLength: input.maxContentLength ?? undefined,\n\t\tauthorizeUrl,\n\t\tabortSignal: ctx.abortSignal,\n\t});\n\tresult.content = wrapUntrustedData(sanitizeWebContent(result.content), result.finalUrl);\n\treturn result;\n}\n\n// ── Tool factory ────────────────────────────────────────────────────────────\n\nexport function createResearchTool(context: InstanceAiContext) {\n\treturn new Tool('research')","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/src/tools/research.tool.ts#L214-L250","documentation":"Error \"Redirect from ${new URL(input.url).hostname} to ${new URL(targetUrl).hostname} is not allowed. Skip this URL and try a different research strategy — retrying the same URL will not help.\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/instance-ai/src/tools/research.tool.ts:232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}