Skip to main content
spl's user avatar
spl's user avatar
spl's user avatar
spl
  • Member for 4 years, 3 months
  • Last seen more than a month ago
  • London
awarded
awarded
comment
Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?
I've been on the road for a bit now - my apologies for a very delayed response!! i really appreciate your input on this. i can't quite digest all of this good stuff right now - will update once i've been able to process.
awarded
comment
Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?
I've just checked, and I believe the canonical hostname is https://www.example.com.
comment
Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?
On the 301 redirection - here is what I've added within the htaccess file: RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] # and added this to then get from non-www to www RewriteCond %{HTTP_HOST} ^example.com [nc] RewriteRule ^(.*)$ https://www.example.com/$1 [r=301,nc] Based on what you've outlined above, it looks as though my solution is (a) not necessarily correct if not canonical in the first place, and (b). also not correctly written up. I don't quite understand what the L is for in place of the NC?
comment
Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?
On the question of whether my canonical hostname uses the www subdomain - i don't know, to be honest? Can i check this (and, is there a location where i should check it?) Is this something to inspect on the webhost system, or within the actual site content?
comment
Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?
Regarding the sitemap, my XML sitemap only references 'https:' URLs.
comment
Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?
Really appreciate the feedback! i've added in my individual responses just below this. Regarding referencing URL using either the root domain or the www. prefix, i'm using root relative linking? So for example, to get to my profile page the link is href="/profile.html" from anywhere in the website, so that it finds the root. i'll admit that i still do not understand the implications around the search engine optimisation for this - would this then mean that this could be interfered with when it comes to search engines identify the canonical pages?
Loading…
comment
Completely confused about linking relative to the root versus linking relative to the document
This is correct, and i (kind of) understand now. Unfortunately, i misinterpreted the original concept as still requiring including the document relative file paths. As a result, yes, the links do still function, but i am guessing - i still do not know or quite understand how - that these may be causing at least some of the hundreds of 404s we are still seeing. Some appear to be old legacy links from the previous website. I have 301 redirected these and am currently removing the '../' indicators from everywhere in the website, including navigations, image links, and document links.
Loading…
comment
What is the correct or most appropriate way to address phantom or untraceable 404 errors showing up in a website audit?
There is not, no. I have redirected these three but with no indication of where they were coming from.
Loading…
awarded
comment
Website crawler returns hundreds of 404 errors for pages that do not exist containing duplicate directories
I see - you mentioned tools but i can't see any links within the message, unfortunately?
comment
Website crawler returns hundreds of 404 errors for pages that do not exist containing duplicate directories
Many thanks for this feedback! I have gone through every HTML instance on the website and modified the href=" values for these, to include a leading slash. I would imagine the next step is to process a new sitemap.