You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kentico 9静态IP配置异常:子域名访问出现404错误

Hey there, let’s walk through troubleshooting this 404 error with your Kentico 9 deployment— I’ve worked through plenty of IIS/Kentico setup snags before, so here’s my go-to checklist:

Troubleshooting Steps for Kentico 9 + IIS 404 Error

1. Verify Local Access First

Start by eliminating domain-related variables to narrow down the issue:

  • Try accessing your site directly via http://localhost or your local IP (e.g., http://192.168.1.100). If this also returns a 404:
    • Check IIS default documents: Ensure default.aspx (Kentico’s main entry point) is at the top of the default documents list in IIS— it’s the first file IIS looks for when loading the root.
    • Validate folder permissions: Right-click C:\inetpub, go to Properties > Security, and grant IIS_IUSRS and IUSR users Read & Execute permissions. Kentico needs these to access page files and database connections.
    • Check Kentico site bindings: If you can access the Kentico admin (try http://localhost/admin), go to Settings > Sites > [Your Site] > Domain names and confirm sub.domainname.com is added as a valid domain.

2. Validate Domain Routing & Port Forwarding

If local access works, the problem is likely in how external traffic reaches your local machine:

  • Confirm port forwarding on your router: Make sure port 80 (HTTP) and/or 443 (HTTPS) are forwarded to your Windows 10 machine’s local IP. A common mistake is forwarding to the wrong device or forgetting to enable the rule.
  • Test DNS resolution: Run nslookup sub.domainname.com on both your local machine and an external device (e.g., a phone on cellular data). Both should return your static IP— if not, double-check your domain provider’s A record settings.
  • Test static IP directly: From an external network, visit http://[your-static-IP]. If this returns 404, port forwarding or firewall rules are blocking traffic. If it works, the issue is with your domain’s DNS or IIS binding.

3. Check IIS Site Bindings

Don’t overlook the most basic IIS setting for domain access:

  • Open IIS Manager, right-click your Kentico site, and select Edit Bindings.
  • Confirm there’s a binding entry for sub.domainname.com: Set the type to HTTP/HTTPS, IP address to All Unassigned or your local IP, host name to sub.domainname.com, and port to 80/443.
  • Without this binding, IIS won’t recognize requests for your subdomain and will return a 404.

4. Verify Kentico URL Rewrite Setup

Kentico 9 relies heavily on URL rewriting for friendly URLs— misconfigurations here often cause 404s:

  • Ensure the URL Rewrite module is installed in IIS: Check the IIS feature view for the URL Rewrite icon; if missing, install it via IIS Manager’s "Get New Web Platform Components" tool.
  • Inspect your web.config file: The root C:\inetpub\web.config should contain Kentico’s auto-generated rewrite rules. If rules are missing or corrupted, restore them from a Kentico backup or the original installation files.
  • Check Kentico’s SEO settings: Go to Settings > URLs & SEO > Friendly URLs and confirm friendly URLs are enabled, with rules applied to your subdomain site.

5. Rule Out Firewall/Antivirus Interception

Local security tools often block external traffic without warning:

  • Temporarily disable Windows Defender Firewall: If the site loads after disabling it, create an inbound rule to allow HTTP/HTTPS traffic for IIS.
  • Check third-party antivirus: Some antivirus suites include network protection that blocks incoming requests. Disable this temporarily to test— if it fixes the issue, add an exception for your Kentico site.

内容的提问来源于stack exchange,提问作者ramnath

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:12:28