Question: Does it matter if some links are full URL: ie: http://example.com/contact-us.html
(absolute) versus relative (example.com/contact-us.html
) for SEO purposes? The difference is when using absolute it includes the full http://
part versus relative doesn't include it in the link when viewing source.
I have a site that has a submission form that I would like to serve up via SSL / HTTPS. The issue is that when I force (via .htaccess
) for this particular submission form page to SSL / HTTPS only then all of the links on the page are to HTTPS. For example, the main navigation bar on all pages of the site and what is indexed by search engines is HTTP only. On this one HTTPS page it shows all of the other navigation links as HTTPS because I used relative links in the HTML (ie: /contact-us.html
). I don't want search engines to index HTTP and HTTPS versions of all of the same pages (identical indexing).
I have updated the main navigation section to do absolute links (ie: www.example.com/contact-us.html
) however, I noticed when I looked in the source it will reflect the whole www.example.com/page-name.html
section but on other relative links that I didn't make absolute it will only reflect the /page-name.html
.
Will this matter for SEO purposes that some links on the page show the domain's www.example.com/page-name.html
while some links are relative /page-name.html
? If you look at the source of any page the navigation is now all absolute and any content, paragraph, etc related links are all relative.
Does this matter SEO-wise?
If so, what is the work around? Go through the source of ALL pages and make them absolute?
/contact-us.html
The link with the domain name but not the protocol is a broken link. You can also to protocol relative links that start with two slashes://example.com/contact-us.html
– Stephen Ostermiller♦ Jul 10 '17 at 9:26example.com/contact-us.html
)" - that is most probably an invalid relative URL, I suspect you mean/contact-us.html
(which is a root-relative URL). "...absolute links (ie:www.example.com/contact-us.html
)" - that's not an absolute URL, it's relative (as stated above). An absolute URL must include the protocol. – MrWhite Jul 10 '17 at 9:26.htaccess
)" - The forcing of HTTPS via.htaccess
is only to catch direct requests, you should already be linking to the correct protocol (ie.https://...
) in your HTML, otherwise users will experience an external redirect everytime they follow an internal link to your form. Incidentally, it is the destination of the formaction
that must be HTTPS, in order to secure the form submission. – MrWhite Jul 10 '17 at 9:31