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

GoDaddy托管WordPress首页自动跳转至陌生页面问题求助

Fixing Homepage-Only Malicious Redirect on GoDaddy WordPress Site

Hey there, sorry to hear you're stuck with this frustrating redirect issue on your WordPress site! Since only your homepage is redirecting to that sketchy link while other pages work fine, we can narrow down the troubleshooting steps pretty effectively. Let's walk through them one by one:

1. Check WordPress Homepage Settings First

  • Head to your WordPress dashboard → Settings > Reading. Double-check the "Your homepage displays" section—make sure it's set to either your latest posts or a legitimate static page, not some unknown entry.
  • Go to Appearance > Customize > Homepage Template (or similar, depending on your theme). Look for any custom HTML/JS code snippets added here—malicious redirects often hide in custom homepage scripts.

2. Inspect Your Theme's Homepage Template Files

  • Use FTP or GoDaddy's built-in File Manager to access your site's files. Navigate to wp-content/themes/[your-active-theme]/ and look for front-page.php or home.php (these are the common templates for the homepage).
  • Open these files and scan for suspicious code:
    • Any unexpected header("Location: ...") functions pointing to the malicious URL
    • Base64-encoded strings (they look like random letters/numbers) that might decode to redirect logic
  • Also check your theme's functions.php file—some attackers inject code here that triggers only on the homepage.

3. Verify Database Options for Tampering

  • Access your site's database via phpMyAdmin (available in GoDaddy's hosting control panel).
  • Find the wp_options table (your table prefix might be different if you changed it). Search for the home and siteurl options—ensure their values are set correctly to your domain with no extra characters or redirect URLs.
  • Do a broader search in the wp_options table for terms like "redirect" or "url" to spot any malicious custom options added by attackers.

4. Rule Out Plugin Issues

  • Temporarily disable all WordPress plugins. If the homepage stops redirecting, you know one of the plugins is the culprit.
  • Re-enable plugins one by one, checking the homepage after each enablement, to identify which plugin is causing the problem. Pay extra attention to recently installed/updated plugins, or any less reputable ones you might have added.

5. Recheck Your .htaccess File (Thoroughly)

  • First, make a backup of your current .htaccess file in case you need to revert.
  • Replace the content with the default WordPress .htaccess rules:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    
  • Set the file permissions for .htaccess to 644 to prevent unauthorized modifications in the future.

6. Run a Malware Scan

  • Use GoDaddy's built-in website security scanner (found in your hosting dashboard) to run a full site scan—this can detect hidden malicious files or injected code you might have missed.
  • If you can install plugins safely, use a reputable security plugin like Wordfence to perform a deep scan of your site files and database.

If none of these steps resolve the issue, reach out to GoDaddy's support team—they can help check for server-level redirects or other hosting-related issues that might be causing the problem.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.26 09:11:09