🚨 6 must-dos while editing an .htaccess file


🚀 Psst... Here's the truth:

It's not enough to send your recommendations to developers and call it a day. They won't implement any of your smart ideas (sad, right?)

What you need to do instead is to start speaking the same language with developers (and it does not = becoming one 😉).

This is the only way to get your SEO recommendations implemented.

I created the BRIDGE framework to help you with that. And I teach it inside my short but impactful GSI course:

Check out the Get SEO Implemented course>>

Let’s talk about the almighty .htaccess (most SEOs avoid).

The .htaccess file configures how your Apache-based web server operates.

You can set up site-wide (like www to non-www) and individual (like Page A to Page B) redirects there.

Note:

Never EVER edit .htaccess directly in your CMS (even if plugins give you this option). Especially if you don't have FTP access to revert the changes in case any error occurs.

The .htaccess file rules to NEVER break:

  • Make a backup of the website installation before accessing .htaccess
  • Always download the initial .htaccess file before editing it. Save its unedited copy if you need to revert your changes quickly.
  • Make sure that the .htaccess file is saved in the right format and that no invisible characters are added to it.
  • Before uploading your edited .htaccess to the server, run it through a validator (this will help to identify if there are any special characters which are not directly seen in the file)
  • If everything is OK, upload the updated file to the root folder, replacing the old one
  • Check the website in different browsers to make sure it works (and not just cached).

Have you ever edited an .htaccess file? Any stories to share? Let me know.

Grab this free resource 👇

6 must-dos while editing an .htaccess file

Download a free PDF with a copy of this email, so it's easy for you to get back to it when you need (no signup required) 👇👇👇

Smart SEO Newsletter

I'll help you trade an imposter syndrome for a technical SEO superpower. My mission is to break down and simplify complex technical SEO things so that you can understand and use them to advance your SEO career.

Read more from Smart SEO Newsletter

Critical knowledge alert 🚨🚨🚨 As a technical SEO, it’s crucial you know the difference between source code and rendered HTML them. Source code It is the initial code of the page before any JavaScript files are executed and CSS files are parsed. It’s the code you see when viewing the source code of a page in your browser. Rendered HTML It is displayed after CSS and JavaScript are processed. When you inspect an element on a page using Chrome dev tools, you’re looking at the rendered HTML. Why is...

JavaScript is a great option to make website pages more interactive and less boring. But it’s also a good way to kill a website’s SEO if implemented incorrectly. Tired Oh No GIF by Law & Order That’s why, as a technical SEO, you need to be comfortable debugging JavaScript issues. Here’s how you do it in 3 steps 👇👇👇 Step 1: Disable JavaScript in the browser using Web Developer Chrome extension The easiest way to do it is to disable JavaScript in your browser. I use the Web Developer Chrome...

Google and JavaScript

Here’s the truth every SEO needs to know: No matter how great your website is, if Google can’t index it due to JavaScript issues, you’re missing out on traffic opportunities. JavaScript is a great option to make website pages more interactive and less boring. But it’s also a good way to kill a website’s SEO if implemented incorrectly. So here’s what you need to know about Google and JavaScript relationships👇👇👇 Google doesn’t interact with your content Googlebot can’t click the buttons on your...