DEV Community

Cover image for Optimization of natural referencing with WordPress
Thomas Bnt
Thomas Bnt Subscriber

Posted on

Optimization of natural referencing with WordPress

Best thinks to do for beginner on WordPress with SEO

For most new Wordpress users, it is important to know that your domain name and the URL displayed is very important for natural referencing (SEO).

For example, you make posts and you have a domain name named MyBeautifulGarden.com. If you want to write a new post on 🍅, think about some important points :

  • A title with the main keyword of your post

    ↪ In this case tomatoes would be necessary.

  • A nice description with your post with the main keyword

    Look at my garden, sooo much tomatoes ! You can make homemade tomato sauce or gazpacho, discover what you can do with this fruit!

  • An picture ? It's more appreciated, but it's optional.

  • Put your website in https

  • Get a clean URL.

    MyBeautifulGarden.com/loves-tomatoes

As you can see, by default Wordpress puts your permalink with the post ID. To change it, go to Settings ➡ Permalinks and select Post name.

Edit Permalinks on Wordpress


If you have any problems such as

Not Found

The requested URL /loves-tomatoes-🍅 was not found on this server.

Apache/2 Server at localhost Port 80
Enter fullscreen mode Exit fullscreen mode

You must enable mod_rewrite as well as touch the.htaccess. Don't forget to restart Apache! If you are hosted on a shared server, contact the administrator.

sudo a2enmod rewrite
sudo systemctl restart apache2
Enter fullscreen mode Exit fullscreen mode

More help :

That's not a typical Wordpress rewrite block. This is:

# 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

See http://codex.wordpress.org/Using_Permalinks#Where.27s_my_.htaccess_file.3F

Where's my .htaccess file? WordPress's index.php and .htaccess files should be together…

If all above point not work. Then try this one. I tried it. It's working for me.

  1. Go /etc/httpd/conf/httpd.conf.
  2. Change the AllowOverride None to AllowOverride All.
  3. Restart the apache server.

UPDATE 2017

For new versions of apache the file is called apache2.conf

So to access the file, type…


🍅 I recommend the Yoast SEO plugin to manage it.

Top comments (0)