Our Services

🌐

Web Development

Custom websites built with Next.js and React β€” fast, responsive, and optimized for search. From brochure sites to complex web applications, we build to perform.

Learn more β†’
🚨

Code Red Malware Removal

Website hacked, redirecting your visitors, or flagged by Google? Code Red is our emergency website malware removal service β€” same-day response, a flat price quoted upfront, and your site returned clean, patched, and cleared of Google's malware warnings. We remove the infection, close the hole that let it in, and harden the site so it stays clean.

Learn more β†’
πŸ”

Website Security Audit

**Most website infections are invisible to the owner** β€” spam pages only Google sees, redirects that fire only for mobile or search visitors, and backdoors sitting dormant until they are used. For a limited time, our **website security audit** checks every file, your database, the public blocklists, and your plugins and themes, then gives you a short, plain-English report of exactly what is there. If we find an active infection, the **fee comes straight off the cleanup**. If your site is clean, we will show you how to keep it that way.

Learn more β†’
βš™οΈ

Software Development

Custom software, APIs, SaaS platforms, and full-stack applications built for Canadian businesses. We own the build from architecture through deployment and ongoing support.

Learn more β†’
πŸ“±

App Development

We build with the latest agentic AI engineering practices β€” cutting speed to market by more than half and passing the savings straight to you. React Native apps that ship to iOS and Android from one codebase, and Progressive Web Apps when a store listing isn't the right answer. Fixed-price proposals, full source code ownership.

Learn more β†’
πŸ€–

AI Automation

Business process automation, AI chatbots, LLM integrations, and workflow automation for Canadian SMBs. We build the systems β€” you reclaim the hours.

Learn more β†’
πŸ›’

E-Commerce

Shopify, WooCommerce, and custom storefronts for Canadian retailers. Payment integrations, product catalogue management, and conversion-optimized UX.

Learn more β†’
πŸ“Š

Analytics & Optimization

GA4 implementation, conversion tracking, A/B testing, and data dashboards. We turn your website's data into decisions that grow revenue.

Learn more β†’
🎁

Free Custom Website β€” 3-Month Trial

We build your business a fully custom, professionally designed website and host it free for 3 months. No credit card. No commitment. After the trial, keep it running for a simple flat monthly rate β€” hosting, SSL, and maintenance included. Contact us for current pricing.

Learn more β†’
πŸ›’

eCommerce Optimization

AI-powered analytics, A/B testing, and personalization for Shopify and WooCommerce stores. We turn your existing traffic into more revenue β€” without spending more on ads.

Learn more β†’
πŸ“

Local SEO

Google Business Profile management, local keyword optimization, citation building, and microsite strategy. We get your business found by customers searching in your area.

Learn more β†’
πŸ“¨

Inbox Rescue

Business emails landing in spam β€” or not arriving at all? Inbox Rescue is our email deliverability fix: we set up the authentication Gmail and Yahoo now require (SPF, DKIM, DMARC), repair your domain's sending reputation, get you off blacklists, and test until your mail lands in the inbox. Flat fee, usually fixed in days.

Learn more β†’
πŸ“±

App Development for US Companies

A senior Canadian app development company on Eastern Time. You own all IP and source code. Fixed-price USD proposals 25–30% below US agency quotes. One codebase for iOS and Android, store submission included.

Learn more β†’
← All articles
website redirectWordPressmalware removalhtaccesswebsite security

How to Undo a Website Redirect (and Tell a Harmless One From a Hack)

DS Web Solutions Inc.Β·Β·4 min read
How to Undo a Website Redirect (and Tell a Harmless One From a Hack)

How to undo a website redirect: find where it lives, remove it safely, clear cached 301s, and spot when the redirect is actually malware.

Knowing how to undo a website redirect starts with one question: who put it there? If you or a developer set it up, you can remove it in a few minutes. If you didn't, it's a symptom of a compromised site, and deleting one line won't fix it. The redirect will come back. This guide covers both cases, in the order we'd check them.

First, Confirm the Redirect Is Real and Not Just Cached

A permanent (301) redirect can stay in a browser's cache long after you've removed it from the server. Google's documentation on redirects explains that permanent redirects tell browsers and search engines the old address has moved for good. That's why you can delete a rule and still land on the wrong page.

Before you edit anything, rule out the cache:

  1. Open the site in a private or incognito window.
  2. Try a different device on mobile data, not your office Wi-Fi.
  3. Clear your browser cache for that domain, then test again.
  4. Test with a header checker or `curl -I https://yourdomain.com` to see the actual status code (301, 302) and the `Location` target.

If the redirect only happens on your own browser, you're done. If it shows up everywhere, keep going. If it only happens for some visitors, such as people arriving from Google or on phones, treat that as a red flag. Hackers often hide redirects from site owners and logged-in admins.

Where a Redirect Can Live

Redirects aren't stored in one place. Work through these layers from the outside in. Stop when the behaviour changes.

1. DNS, CDN, and domain registrar

Registrars often offer 'domain forwarding'. Cloudflare and similar services have page rules or redirect rules. If the redirect happens before your server is even reached, check these dashboards first. Look for forwarding rules you don't recognize.

2. Hosting control panel

cPanel and similar panels have a 'Redirects' tool that writes rules into your `.htaccess` file. Delete the offending entry there. It's the cleanest method on Apache hosting.

3. The .htaccess file or server config

On Apache, look for `Redirect`, `RedirectMatch`, or `RewriteRule ... [R=301]` lines. A standard WordPress `.htaccess` is short: a `# BEGIN WordPress` block with a handful of rewrite lines. Anything beyond that, especially long, obfuscated rules or conditions that check for the visitor's referrer or user agent, deserves suspicion. On Nginx, the equivalent is `return 301` or `rewrite` in the server block.

4. WordPress settings and plugins

Check Settings β†’ General for the WordPress Address and Site Address. A wrong value there can redirect the entire site. Then review redirect and SEO plugins (Redirection, Rank Math, Yoast Premium and similar) for rules, and look for plugins you don't remember installing. If you can't log in, rename the `/wp-content/plugins` folder over SFTP to deactivate everything at once, then restore it and reactivate plugins one at a time.

5. Theme files and the database

A redirect can also be a few lines of JavaScript or PHP in `header.php`, `functions.php`, or `wp-config.php`. It can be injected into post content or the `wp_options` table. This is the usual hiding place for malicious redirects.

If you delete a redirect and it reappears within a day, you didn't remove the redirect. You removed the symptom.

Removing a Redirect You Set Up Yourself

Back up the file or plugin settings first. Then remove the specific rule, save, and test in a private window. A few judgment calls:

  • Temporary move (302) you're finished with: delete it. The original URL works again right away.
  • Permanent move (301) you want to reverse: delete it, but expect a lag. Browsers may remember the 301, and search engines can take days or weeks to reindex the original URL.
  • Old HTTP-to-HTTPS or www rules: don't delete these unless you're replacing them. Removing them can create duplicate versions of your site.
  • Redirect loops: if you get 'too many redirects', two rules are fighting, often a plugin versus `.htaccess`, or a CDN set to 'Flexible' SSL against a server that forces HTTPS. Remove one side.

If you're reversing a real site move, Google's guidance on site moves with URL changes is worth reading. Keep redirects in place for a while rather than yanking them out all at once.

When the Redirect Isn't Yours: Treat It as Malware

Signs the redirect is malicious: it sends people to pharmacy, gambling, or fake-prize pages. It only fires from search results or on mobile. Rules in `.htaccess` keep returning after you delete them. Admin users or plugins appear that nobody created. In that case, undoing the redirect is only step one.

A proper cleanup means finding the backdoor that put the rule there, removing it, changing every credential, and updating whatever was vulnerable. Otherwise the infection reinstalls itself. Our post on what a real cleanup involves walks through that process. For the diagnostic side, see why your site sends visitors elsewhere. If you'd rather hand it off, our website malware removal service handles the whole job, including the cleanup and the hardening afterward.

After the Redirect Is Gone

  • Test the homepage, a few inner pages, and a page reached from a Google search result.
  • Check Google Search Console for security issues and manual actions, and request a review if you were flagged.
  • Change hosting, WordPress admin, database, and SFTP passwords if there was any chance of a compromise.
  • Update WordPress core, themes, and plugins, and delete any you don't use.
  • Keep a dated copy of your working `.htaccess` so you can compare it later.

The takeaway: a redirect you created is a one-line fix, but a redirect you didn't create is a security problem. Check the cache, work through the layers, and ask whether the rule keeps coming back. If it does, stop deleting it and get the infection cleaned out. Our related guide on what to do when your own website sends visitors somewhere else covers the next steps.

References

  1. Google Search Central β€” Redirects and Google Search
  2. Google Search Central β€” Site moves with URL changes

This article is general educational information, not professional, medical, or purchasing advice. External links are provided for reference; DS Web Solutions Inc. is not affiliated with and does not endorse any third-party brand or organization listed.

Ready to get started with DS Web Solutions Inc.?

Vaughan & the surrounding area.

Call (289) 807-3511