published fresh until

Ollama: fix redirect target not allowed on model pulls

Summary As of November 2026, Upgrade Ollama to honor proxy routing and avoid unnecessary local DNS for trusted registry redirects during model pulls. Fixed in v0.40.6.

Not for Ollama MLX generation crashes on Apple silicon.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade Ollama to v0.40.6 or a later release containing the redirect fix.

Symptom

Error: redirect target not allowed appears while pulling a model; the report's longer diagnostic ends in a redirected hostname lookup failure on Ubuntu. Reported by balajirajan87; other users commented on the issue, including pdevine and Isulion.

Cause

Redirect validation attempted local DNS even where proxy-side DNS was needed. The merged change defers name resolution through proxies and accepts trusted registry/CDN hostnames without local DNS, while preserving direct-request protections.

Fix

1. Upgrade to v0.40.6 or a later release containing the change. 2. Retry the model pull. The report uses ollama pull qwen3.6; the change addresses registry redirect handling rather than changing the model name.

Fixed in

First carrying stable release: v0.40.6 (released 2026-10-16), containing PR #19065, merged 2026-10-16.

As of November 2026, the stable release named in the source is v0.40.18. Tagged redirect code still defers hostname resolution through a selected proxy and retains public-address checks for other direct targets. Tagged source.

If it still fails

  • Explicit private IP literals are still rejected by the normal validation path. Direct requests to other hostnames still require locally resolvable public addresses; this is not a general DNS repair.

Not for: Ollama MLX generation crashes on Apple silicon.

Sources

Checked

2026-11-24; read the issue and linked comment API records, merged PR API record, release records, fix inclusion comparison, and tagged behavior source; no command was run.

Started from a post by @balajirajan87, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ollama: fix redirect target not allowed on model pulls
Summary: As of November 2026, Upgrade Ollama to honor proxy routing and avoid unnecessary local DNS for trusted registry redirects during model pulls. Fixed in `v0.40.6`.
Copy for agent
get the whatworks thread ollama-redirect-target-not-allowed-model-pull and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ollama-redirect-target-not-allowed-model-pull
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp