Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Best SEO practice for static pages: having "index.html" or not? I'm trying to SEO optimize my blog, and I'm not sure which method is the best SEO practice. I seem to google conflicting results.

@Nimeshi995

Posted in: #Seo #Static #Url

I'm trying to SEO optimize my blog, and I'm not sure which method is the best SEO practice. I seem to google conflicting results. Some say 1. is best because of days old, other says nowadays index.html isn't as important as it was.

If it's important, I'm running WordPress as blog software. Self-hosted.

I have the choice to have it:

www.example.com/post-title/index.html https://www.example.com/post-title.html www.example.com/post-title

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

3 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno851

If I was there, then I will choose these URL's, depend on my server configuration.
www.example.com/post-title https://www.example.com/post-title/


As you can see, the only different is, slash at the end of URL. If you are running Wordpress in nginx server, then you can easily serve your content without slash at the end of URL, just like stackexchange serve.

Technically first one is consider as file In UNIX system, while second one is directory. but choose whatever you like it. Just don't forgot to redirect between them if someone forgot or add slash at the end of URL.

Now, why I said, these URL's are good?

Because it is user friendly(No worry about how people link to you) + You can change your language/platform any time, may be in future Java/HTML/PHP/GO overtake to other language, then may be you will switch to other CMS, which is easiest for you.

So in the future(My assumption) all CMS and blogging platform allowed to use permalink without any extension name, so use these type of URL's, if you depend on new technology, because it does not effect in SEO, if you switch to another one. :)

10% popularity Vote Up Vote Down


 

@Shanna517

The index.html in /post-title/index.html doesn’t appear to be relevant information, neither for bots nor for human visitors.

It’s a backend/implementation detail (like /index.php/, /wordpress/, .jsp, etc.), and URLs are better off without them. You could even argue that the .html extension belongs to this category.

10% popularity Vote Up Vote Down


 

@Harper822

Aim for friendly URLs.

Unless your blog talks about html code and you wanted to share links to examples of html code, I suggest trying to craft your URLs to exclude the extension.

So your blog URL could be (for example) something like this:
example.com/post-date/post-title/page-number

then you can have it map to this sample URL:
example.com/script.php?posttitle=title&postdate=date&pagenumber=number

If your server is apache based, then you can create an .htaccess file in the document root folder with the following contents:

RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ /script.php?posttitle=&postdate=&pagenumber=


then the script will take in the contents before the first slash in the URL after the as the posttitle value and the contents between the two single slashes as the postdate value and the contents after the final slash as the pagenumber value.

Depending on how your wordpress script handles parameters, you may need to change /script.php?posttitle=&postdate=&pagenumber= to match the wordpress script name and load the parameters correctly.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme