I made the mistake of putting in the following code on my .htaccess file thru Yoast SEO:

# Remove www from any URLs that have them:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

Now there's an infinite loop and I can't access my WordPress dashboard anymore. Is it possible to access the .htaccess file thru an FTP client like FileZilla and remove the change?

1 Answer 1


Absolutely. Your .htaccess file is located in the root directory of the website and can be accessed via FTP.

  • 3
    Depending on your FTP client, you may need to configure it to show hidden files for .htaccess to be visible.
    – DaveP
    Commented Mar 28, 2016 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.