Skip to main content
Glama

set_forwarding

Configure URL forwarding for domains to redirect visitors or display content in an iframe with custom titles.

Instructions

Set URL forwarding for a domain. Supports standard forwarding (301/302 redirect) and stealth forwarding (iframe with custom title).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to set forwarding for
urlYesTarget URL to forward to
stealthNoUse stealth forwarding (iframe) instead of redirect
stealth_titleNoPage title for stealth forwarding
is_temporaryNoUse 302 (temporary) redirect instead of 301 (permanent)

Implementation Reference

  • The API client method that executes the 'set_forwarding' command.
    async setForwarding(domain: string, url: string, isTemp?: boolean): Promise<DynadotResponse> {
      const params: Record<string, string> = { domain, forward_url: url };
      if (isTemp) params.is_temp = "1";
      return this.call("set_forwarding", params);
    }
  • The tool registration and handler implementation for 'set_forwarding' in the settings tools module.
    server.tool(
      "set_forwarding",
      "Set URL forwarding for a domain. Supports standard forwarding (301/302 " +
        "redirect) and stealth forwarding (iframe with custom title).",
      {
        domain: z.string().describe("Domain name to set forwarding for"),
        url: z.string().describe("Target URL to forward to"),
        stealth: z
          .boolean()
          .optional()
          .describe("Use stealth forwarding (iframe) instead of redirect"),
        stealth_title: z
          .string()
          .optional()
          .describe("Page title for stealth forwarding"),
        is_temporary: z
          .boolean()
          .optional()
          .describe("Use 302 (temporary) redirect instead of 301 (permanent)"),
      },
      async ({ domain, url, stealth, stealth_title, is_temporary }) => {
        try {
          let result;
          if (stealth) {
            result = await client.setStealth(domain, url, stealth_title);
          } else {
            result = await client.setForwarding(domain, url, is_temporary);
          }
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [
              { type: "text" as const, text: `Failed to set forwarding: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/dynadot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server