REMINDER
How to "force" redirect from .html to clean version?
-
Hello Appdrag team
Despite allowing the rewriting of URL to remove the html, we notice that all pages are indexed in duplicate. .html do not redirect to clean URL. Causing major SEO issues....
I tried forcing a redirection using the redirection tool for a .html page to its version without it, but it does not seem to be effective. Would love some help figuring out how to force URL rewriting and redirection. Is there an htaccess file somewhere to write it inside? Or another way to do so? Thanks a lot -
@KEVIN-JOURDAN said in How to "force" redirect from .html to clean version?:
I tried forcing a redirection using the redirection tool for a .html page to its version without it, but it does not seem to be effective. Would love some help figuring out how to force URL rewriting and redirection. Is there an htaccess file somewhere to write it inside? Or another way to do so? Thanks a lot
Hello Kevin,
please check the source page of your site and check the canonical meta, google will index only the canonical urlYou will notice that in both case the canonical url is the same regardless of the access url with or without html
-
@Joseph-Benguira said in How to "force" redirect from .html to clean version?:
anonical url is the same regardless of the access url with or without html
Hello Joseph thanks for the quick feedback.
Unfortunately, that does not seem to be the case.Shortly after switching to no .html, we lost all rankings.
As of today, our home page has 3 different versions, all index by google (talk about duplicate content :)) and all pages are indexed twice. Once with .html and once without.Running several tools, we identified that all pages are thus considered duplicate, and being penalized by google. We do not rank on any related KW, even very long tail, with our root domain related URLS.
.html is properly set to without html canonical as per your tool.
Yet the redirection is not working (i tried using the redirection tool to force html to non html, it didn't work. See for instance https://www.dotmarket.eu/estimation.html wih is set to redirect to https://www.dotmarket.eu/estimation.Happy if you have a solution to this!
If not, we might just go back to having all our URL with .html
Not as clean, but it did use to rank -
I recommend you this great article from Moz.com about duplicate content:
https://moz.com/learn/seo/duplicate-contentHow to fix duplicate content issues
Fixing duplicate content issues all comes down to the same central idea: specifying which of the duplicates is the "correct" one.Whenever content on a site can be found at multiple URLs, it should be canonicalized for search engines. Let's go over the three main ways to do this: Using a 301 redirect to the correct URL, the rel=canonical attribute, or using the parameter handling tool in Google Search Console.
This is exactly what is happening on your site, if you check the source code of this page (with .html) :
https://www.dotmarket.eu/estimation.html
you will see this: <link rel="canonical" href="https://www.dotmarket.eu/estimation"/>So that's the correct way to tell google and other search engines that the original contact for this page is hosted on that particular url (without .html)
Now please take in consideration that google is not reindexing the whole web every day! This process can take several days to several weeks to complete. You can speed up the process by providing your sitemap.xml file directly to google in google search console.