Magento 2: Product URL Suffix
How do I remove the .html suffix from the product pages?
magento2 product url
add a comment |
How do I remove the .html suffix from the product pages?
magento2 product url
From just the product pages?
– philwinkle
May 12 '16 at 21:36
The .html suffix only seems to appear on the product pages. The CMS pages don't show .html, nor does the home page.
– MikeMason
May 12 '16 at 21:39
Categories should also show .html - would you like to remove it or change it?
– philwinkle
May 12 '16 at 21:39
Ahhh yes, you're correct, the category page has it too. I'd prefer a forward slash in its place.
– MikeMason
May 12 '16 at 21:40
add a comment |
How do I remove the .html suffix from the product pages?
magento2 product url
How do I remove the .html suffix from the product pages?
magento2 product url
magento2 product url
asked May 12 '16 at 21:05
MikeMasonMikeMason
65221236
65221236
From just the product pages?
– philwinkle
May 12 '16 at 21:36
The .html suffix only seems to appear on the product pages. The CMS pages don't show .html, nor does the home page.
– MikeMason
May 12 '16 at 21:39
Categories should also show .html - would you like to remove it or change it?
– philwinkle
May 12 '16 at 21:39
Ahhh yes, you're correct, the category page has it too. I'd prefer a forward slash in its place.
– MikeMason
May 12 '16 at 21:40
add a comment |
From just the product pages?
– philwinkle
May 12 '16 at 21:36
The .html suffix only seems to appear on the product pages. The CMS pages don't show .html, nor does the home page.
– MikeMason
May 12 '16 at 21:39
Categories should also show .html - would you like to remove it or change it?
– philwinkle
May 12 '16 at 21:39
Ahhh yes, you're correct, the category page has it too. I'd prefer a forward slash in its place.
– MikeMason
May 12 '16 at 21:40
From just the product pages?
– philwinkle
May 12 '16 at 21:36
From just the product pages?
– philwinkle
May 12 '16 at 21:36
The .html suffix only seems to appear on the product pages. The CMS pages don't show .html, nor does the home page.
– MikeMason
May 12 '16 at 21:39
The .html suffix only seems to appear on the product pages. The CMS pages don't show .html, nor does the home page.
– MikeMason
May 12 '16 at 21:39
Categories should also show .html - would you like to remove it or change it?
– philwinkle
May 12 '16 at 21:39
Categories should also show .html - would you like to remove it or change it?
– philwinkle
May 12 '16 at 21:39
Ahhh yes, you're correct, the category page has it too. I'd prefer a forward slash in its place.
– MikeMason
May 12 '16 at 21:40
Ahhh yes, you're correct, the category page has it too. I'd prefer a forward slash in its place.
– MikeMason
May 12 '16 at 21:40
add a comment |
2 Answers
2
active
oldest
votes
Open your admin panel navigate on Stores->configuration->Catalog
click on Search Engine Optimization tab
Here you can remove
Product URL Suffix =
Category URL Suffix =
Make these fields blank (remove .html from both fields) save the config and reindex and clear cache of your store.
it's done!
Thank you for the reply. Unfortunately, when I removed the .html, I received a 404 on all product and category pages?
– MikeMason
May 13 '16 at 9:48
Did you reindex and clear cache ??
– Arunendra
May 13 '16 at 9:54
Yes, but it still shows 404 :-/
– MikeMason
May 13 '16 at 9:55
This is the right way for achieve this functionality. Delete var/generation folder retry and also see log files for any errors
– Arunendra
May 13 '16 at 9:58
Okay, thank you. Where are the log files located?
– MikeMason
May 13 '16 at 9:59
|
show 5 more comments
You can just remove .html suffix from your admin panel.
Go to AdminPanel,
Stores -> Configuration -> Catalog -> Catalog
Go to Search Engine Optimization
Section,
Unset value for textfield inside Product URL Suffix
Same as you can do it for category url suffix below another field is Catogory Url Suffix
.
If you can do any text with this field like .php then its display suffix as .php in your link.
Remove var folder and run commnad php bin/magento indexer:reindex
This works well in Magento 2.1.
– Wireblue
Jun 9 '17 at 0:14
1
What about the indexed content in search engines?
– Frank Groot
Jun 29 '17 at 13:52
@FrankGroot, they no longer reference the page. It will always throw a 404. It will take time and crawlers will update the new links. How long would it take? I have no idea.
– Mohammed Joraid
Jul 4 '18 at 3:32
@M.Joraid And that is not the way to go, because you will lose history in the search machines. So you have to write 301 rewrite rules for those links, otherwise you will get penalized by the search engines :)
– Frank Groot
Jul 5 '18 at 13:33
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f115194%2fmagento-2-product-url-suffix%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Open your admin panel navigate on Stores->configuration->Catalog
click on Search Engine Optimization tab
Here you can remove
Product URL Suffix =
Category URL Suffix =
Make these fields blank (remove .html from both fields) save the config and reindex and clear cache of your store.
it's done!
Thank you for the reply. Unfortunately, when I removed the .html, I received a 404 on all product and category pages?
– MikeMason
May 13 '16 at 9:48
Did you reindex and clear cache ??
– Arunendra
May 13 '16 at 9:54
Yes, but it still shows 404 :-/
– MikeMason
May 13 '16 at 9:55
This is the right way for achieve this functionality. Delete var/generation folder retry and also see log files for any errors
– Arunendra
May 13 '16 at 9:58
Okay, thank you. Where are the log files located?
– MikeMason
May 13 '16 at 9:59
|
show 5 more comments
Open your admin panel navigate on Stores->configuration->Catalog
click on Search Engine Optimization tab
Here you can remove
Product URL Suffix =
Category URL Suffix =
Make these fields blank (remove .html from both fields) save the config and reindex and clear cache of your store.
it's done!
Thank you for the reply. Unfortunately, when I removed the .html, I received a 404 on all product and category pages?
– MikeMason
May 13 '16 at 9:48
Did you reindex and clear cache ??
– Arunendra
May 13 '16 at 9:54
Yes, but it still shows 404 :-/
– MikeMason
May 13 '16 at 9:55
This is the right way for achieve this functionality. Delete var/generation folder retry and also see log files for any errors
– Arunendra
May 13 '16 at 9:58
Okay, thank you. Where are the log files located?
– MikeMason
May 13 '16 at 9:59
|
show 5 more comments
Open your admin panel navigate on Stores->configuration->Catalog
click on Search Engine Optimization tab
Here you can remove
Product URL Suffix =
Category URL Suffix =
Make these fields blank (remove .html from both fields) save the config and reindex and clear cache of your store.
it's done!
Open your admin panel navigate on Stores->configuration->Catalog
click on Search Engine Optimization tab
Here you can remove
Product URL Suffix =
Category URL Suffix =
Make these fields blank (remove .html from both fields) save the config and reindex and clear cache of your store.
it's done!
edited 2 days ago
Abdelkebir ELHARFALI
348
348
answered May 13 '16 at 4:33
ArunendraArunendra
6,07331642
6,07331642
Thank you for the reply. Unfortunately, when I removed the .html, I received a 404 on all product and category pages?
– MikeMason
May 13 '16 at 9:48
Did you reindex and clear cache ??
– Arunendra
May 13 '16 at 9:54
Yes, but it still shows 404 :-/
– MikeMason
May 13 '16 at 9:55
This is the right way for achieve this functionality. Delete var/generation folder retry and also see log files for any errors
– Arunendra
May 13 '16 at 9:58
Okay, thank you. Where are the log files located?
– MikeMason
May 13 '16 at 9:59
|
show 5 more comments
Thank you for the reply. Unfortunately, when I removed the .html, I received a 404 on all product and category pages?
– MikeMason
May 13 '16 at 9:48
Did you reindex and clear cache ??
– Arunendra
May 13 '16 at 9:54
Yes, but it still shows 404 :-/
– MikeMason
May 13 '16 at 9:55
This is the right way for achieve this functionality. Delete var/generation folder retry and also see log files for any errors
– Arunendra
May 13 '16 at 9:58
Okay, thank you. Where are the log files located?
– MikeMason
May 13 '16 at 9:59
Thank you for the reply. Unfortunately, when I removed the .html, I received a 404 on all product and category pages?
– MikeMason
May 13 '16 at 9:48
Thank you for the reply. Unfortunately, when I removed the .html, I received a 404 on all product and category pages?
– MikeMason
May 13 '16 at 9:48
Did you reindex and clear cache ??
– Arunendra
May 13 '16 at 9:54
Did you reindex and clear cache ??
– Arunendra
May 13 '16 at 9:54
Yes, but it still shows 404 :-/
– MikeMason
May 13 '16 at 9:55
Yes, but it still shows 404 :-/
– MikeMason
May 13 '16 at 9:55
This is the right way for achieve this functionality. Delete var/generation folder retry and also see log files for any errors
– Arunendra
May 13 '16 at 9:58
This is the right way for achieve this functionality. Delete var/generation folder retry and also see log files for any errors
– Arunendra
May 13 '16 at 9:58
Okay, thank you. Where are the log files located?
– MikeMason
May 13 '16 at 9:59
Okay, thank you. Where are the log files located?
– MikeMason
May 13 '16 at 9:59
|
show 5 more comments
You can just remove .html suffix from your admin panel.
Go to AdminPanel,
Stores -> Configuration -> Catalog -> Catalog
Go to Search Engine Optimization
Section,
Unset value for textfield inside Product URL Suffix
Same as you can do it for category url suffix below another field is Catogory Url Suffix
.
If you can do any text with this field like .php then its display suffix as .php in your link.
Remove var folder and run commnad php bin/magento indexer:reindex
This works well in Magento 2.1.
– Wireblue
Jun 9 '17 at 0:14
1
What about the indexed content in search engines?
– Frank Groot
Jun 29 '17 at 13:52
@FrankGroot, they no longer reference the page. It will always throw a 404. It will take time and crawlers will update the new links. How long would it take? I have no idea.
– Mohammed Joraid
Jul 4 '18 at 3:32
@M.Joraid And that is not the way to go, because you will lose history in the search machines. So you have to write 301 rewrite rules for those links, otherwise you will get penalized by the search engines :)
– Frank Groot
Jul 5 '18 at 13:33
add a comment |
You can just remove .html suffix from your admin panel.
Go to AdminPanel,
Stores -> Configuration -> Catalog -> Catalog
Go to Search Engine Optimization
Section,
Unset value for textfield inside Product URL Suffix
Same as you can do it for category url suffix below another field is Catogory Url Suffix
.
If you can do any text with this field like .php then its display suffix as .php in your link.
Remove var folder and run commnad php bin/magento indexer:reindex
This works well in Magento 2.1.
– Wireblue
Jun 9 '17 at 0:14
1
What about the indexed content in search engines?
– Frank Groot
Jun 29 '17 at 13:52
@FrankGroot, they no longer reference the page. It will always throw a 404. It will take time and crawlers will update the new links. How long would it take? I have no idea.
– Mohammed Joraid
Jul 4 '18 at 3:32
@M.Joraid And that is not the way to go, because you will lose history in the search machines. So you have to write 301 rewrite rules for those links, otherwise you will get penalized by the search engines :)
– Frank Groot
Jul 5 '18 at 13:33
add a comment |
You can just remove .html suffix from your admin panel.
Go to AdminPanel,
Stores -> Configuration -> Catalog -> Catalog
Go to Search Engine Optimization
Section,
Unset value for textfield inside Product URL Suffix
Same as you can do it for category url suffix below another field is Catogory Url Suffix
.
If you can do any text with this field like .php then its display suffix as .php in your link.
Remove var folder and run commnad php bin/magento indexer:reindex
You can just remove .html suffix from your admin panel.
Go to AdminPanel,
Stores -> Configuration -> Catalog -> Catalog
Go to Search Engine Optimization
Section,
Unset value for textfield inside Product URL Suffix
Same as you can do it for category url suffix below another field is Catogory Url Suffix
.
If you can do any text with this field like .php then its display suffix as .php in your link.
Remove var folder and run commnad php bin/magento indexer:reindex
answered May 13 '16 at 4:53
Rakesh JesadiyaRakesh Jesadiya
28.7k1571119
28.7k1571119
This works well in Magento 2.1.
– Wireblue
Jun 9 '17 at 0:14
1
What about the indexed content in search engines?
– Frank Groot
Jun 29 '17 at 13:52
@FrankGroot, they no longer reference the page. It will always throw a 404. It will take time and crawlers will update the new links. How long would it take? I have no idea.
– Mohammed Joraid
Jul 4 '18 at 3:32
@M.Joraid And that is not the way to go, because you will lose history in the search machines. So you have to write 301 rewrite rules for those links, otherwise you will get penalized by the search engines :)
– Frank Groot
Jul 5 '18 at 13:33
add a comment |
This works well in Magento 2.1.
– Wireblue
Jun 9 '17 at 0:14
1
What about the indexed content in search engines?
– Frank Groot
Jun 29 '17 at 13:52
@FrankGroot, they no longer reference the page. It will always throw a 404. It will take time and crawlers will update the new links. How long would it take? I have no idea.
– Mohammed Joraid
Jul 4 '18 at 3:32
@M.Joraid And that is not the way to go, because you will lose history in the search machines. So you have to write 301 rewrite rules for those links, otherwise you will get penalized by the search engines :)
– Frank Groot
Jul 5 '18 at 13:33
This works well in Magento 2.1.
– Wireblue
Jun 9 '17 at 0:14
This works well in Magento 2.1.
– Wireblue
Jun 9 '17 at 0:14
1
1
What about the indexed content in search engines?
– Frank Groot
Jun 29 '17 at 13:52
What about the indexed content in search engines?
– Frank Groot
Jun 29 '17 at 13:52
@FrankGroot, they no longer reference the page. It will always throw a 404. It will take time and crawlers will update the new links. How long would it take? I have no idea.
– Mohammed Joraid
Jul 4 '18 at 3:32
@FrankGroot, they no longer reference the page. It will always throw a 404. It will take time and crawlers will update the new links. How long would it take? I have no idea.
– Mohammed Joraid
Jul 4 '18 at 3:32
@M.Joraid And that is not the way to go, because you will lose history in the search machines. So you have to write 301 rewrite rules for those links, otherwise you will get penalized by the search engines :)
– Frank Groot
Jul 5 '18 at 13:33
@M.Joraid And that is not the way to go, because you will lose history in the search machines. So you have to write 301 rewrite rules for those links, otherwise you will get penalized by the search engines :)
– Frank Groot
Jul 5 '18 at 13:33
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f115194%2fmagento-2-product-url-suffix%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
From just the product pages?
– philwinkle
May 12 '16 at 21:36
The .html suffix only seems to appear on the product pages. The CMS pages don't show .html, nor does the home page.
– MikeMason
May 12 '16 at 21:39
Categories should also show .html - would you like to remove it or change it?
– philwinkle
May 12 '16 at 21:39
Ahhh yes, you're correct, the category page has it too. I'd prefer a forward slash in its place.
– MikeMason
May 12 '16 at 21:40