DEV Community

Cover image for Optimization of natural referencing with WordPress
Thomas Bnt β˜•
Thomas Bnt β˜•

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 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.


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]
# END WordPress


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.


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)