AI Review Ready
Home / Claude Code / Install returns HTML or 403
Fix · Claude Code · install

Claude Code install fails with HTML or a 403

These errors look different but mean the same thing: the install link sent back a web page or an error instead of the install script, and your shell tried to run it. The cause is your region, your network, or a temporary problem.

What you might see

  • CMD: < was unexpected at this time. followed by HTML such as <!DOCTYPE html> (the first line is in your system language).
  • PowerShell: The term 'System.Xml.XmlDocument' is not recognized as the name of a cmdlet, or parse errors quoting HTML/CSS such as Missing argument in parameter list or Missing expression after unary operator '--'.
  • Bash (WSL): syntax error near unexpected token `<'.
  • Any: curl: (22) The requested URL returned error: 403 with no page.

1. Is Claude Code available in your country?

If the output mentions "App unavailable in region", Claude Code is not offered where you are. Check Anthropic's supported countries list.

2. Is a proxy or firewall blocking it?

A bare 403 can come from a corporate proxy or network filter. Test the connection in PowerShell (call curl.exe, because plain curl is an alias there):

curl.exe -sI https://downloads.claude.ai/claude-code-releases/latest

A first line with 200 means you reach the server. A 403 usually means a proxy or filter, or an unsupported region.

3. Retry, or install another way

  • Wait a few minutes and run the original command again; this is often temporary.
  • Use WinGet: winget install Anthropic.ClaudeCode, then open a new terminal and run claude --version. WinGet installs do not update themselves; use winget upgrade Anthropic.ClaudeCode.

Saving the script with -OutFile install.ps1 does not help: the saved file is the same web page.

Other Claude Code install errors on Windows

Source: Anthropic's Claude Code docs, Advanced setup and Troubleshoot installation and login, read 28 Nov 2026. Claude Code updates often: if a step here no longer matches, the official docs win.