Answer :
f your website suddenly redirects to another domain—especially one you do not own—this usually indicates a configuration issue, malware infection, or DNS problem. This guide explains the most common causes and how to fix them on GHFS Hosting.
1. Check DNS Records (Most Common Issue)
If your domain’s DNS is pointing to the wrong IP address, it may redirect to another site.
What to check:
-
Log in to GHFS Hosting client panel or your DNS provider
-
Open DNS Management
-
Verify these records:
If the IP belongs to someone else, your site may load their hosting account.
Fix:
-
Correct the IP address
-
Clear browser and DNS cache
2. Check for .htaccess Redirects
A hacked or misconfigured .htaccess file often causes unexpected redirects.
Steps:
-
Open Plesk → File Manager
-
Go to:
-
Look for suspicious redirect rules such as:
or encoded/hidden lines.
Fix:
-
Rename
.htaccess→.htaccess-old -
Log in to WordPress admin
-
Go to Settings → Permalinks → Save to generate a new clean file
3. Check WordPress Site URL Settings
If WordPress URLs were changed accidentally, your site will redirect.
Check settings:
-
Log in to WordPress admin
-
Go to Settings → General
-
Confirm:
These should match your domain.
If you cannot access WordPress admin:
Edit wp-config.php and add:
4. Check Database for Injected Redirects
Malware may inject redirects into the database.
Steps:
-
Open phpMyAdmin
-
Check the
wp_optionstable -
Look for strange values in:
-
siteurl -
home
If changed, fix them manually.
Also check for unusual JavaScript in:
-
widget text fields
-
theme options
5. Check Theme or Plugin Files for Malware
Hackers often insert redirect scripts into:
-
header.php
-
footer.php
-
functions.php
-
index.php
Signs of malware include:
-
Base64-encoded code
-
Random characters
-
Scripts referencing unknown domains
Fix:
-
Replace theme files with fresh copies
-
Disable suspicious plugins
-
Scan with Wordfence or Sucuri
6. Check for Compromised Plugins or Themes
Old or nulled/illegal plugins are a major infection source.
If you installed a theme or plugin from an unreliable source, remove it immediately.
7. Check Cloudflare Page Rules (If Using Cloudflare)
Cloudflare Page Rules may cause unwanted redirects.
Steps:
-
Log in to Cloudflare
-
Go to Page Rules
-
Look for rules like:
Disable or delete them.
8. Malware Infection on Server (Common in WordPress)
Redirect malware may come from:
-
Unsafe plugins
-
Outdated WordPress core
-
Infected uploads
-
Compromised FTP credentials
Fix:
-
Run a malware scan using Wordfence
-
Update all plugins/themes
-
Change all passwords (hosting, FTP, WordPress)
-
Delete suspicious files
GHFS Hosting support can perform deeper scans if needed.
9. When to Contact GHFS Hosting Support
You should contact support if:
-
Redirects continue after troubleshooting
-
Malware is suspected
-
Your files were modified without your knowledge
-
DNS looks correct but site still redirects
-
You need help restoring a clean backup
Support can identify infections, repair redirects, and secure your hosting environment.