最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - .html end of URl affected to SEO?

programmeradmin2浏览0评论

I want to convert PHP website into WordPress. So, I want to know there are a .html at end of the URL when WordPress permalink is not ended with .html. So, is it affected to SEO?

I want to convert PHP website into WordPress. So, I want to know there are a .html at end of the URL when WordPress permalink is not ended with .html. So, is it affected to SEO?

Share Improve this question edited Jun 20, 2017 at 10:02 Dixita asked Jun 20, 2017 at 9:54 DixitaDixita 216 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

If you currently have /path/to/site.html and change it to /path/to/site, this will affect SEO, as search engines think they know the url (the former).

However, there are solutions to this. You can either keep the .html at the end of the URL (there should be no problem to use a WordPress permalink with .html in the end), or if you want to clean up your URLs, you need to redirect from one to the other (use 301 redirects).

There is extensive material on how redirects work (like this), if you only want the .html to disappear (and rest of the URL stays the same), something like this could already work in an .htaccess

RewriteRule ^(*.)\.html$ $1 [R=301,QSA,L]

Otherwise, you'd need a more complex structure which depends on your specific current situation.

There is a plugin name '.html on PAGE', which will convert all pages to .html page. If you use this plugin you might also need to change in permalink to /%postname%.html

发布评论

评论列表(0)

  1. 暂无评论