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.

  1. Does this matter SEO-wise?

  2. If so, what is the work around? Go through the source of ALL pages and make them absolute?

  • I think you got too many things here. You might need to simplify your question. – TopQnA Jul 10 '17 at 0:31
  • 1
    Relative links are /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:26
  • 2
    I suspect these are just inconsistencies in your question, rather than on your actual site, but you need to be more careful when describing the URLs... "...versus relative (example.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
  • "...when I force (via .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 form action that must be HTTPS, in order to secure the form submission. – MrWhite Jul 10 '17 at 9:31

It's slightly more clear now.

Firstly, you need to set your preferred URL.


Let's say your home page preferred URL is: https://www.example.com

Then have all other versions of your URL to redirect (301) to preferred URL like:

  • http://example.com
  • http://www.example.com
  • https://example.com

TO: https://www.example.com

If above is done then even if you got mix of URLs in your page like with http or https or https://www etc, there will be no issue as it will get redirected to preferred URL.

Relative vs Absolute From SEO side there is no impact so you can have based your need. Just make sure the link doesn't go to 404 page.

| improve this answer | |
  • Yes, everything is HTTP and includes WWW and I have .htaccess forcing this except on one submission form page (HTTPS and www required). The issue is when viewing source on a different page I have some ABSOLUTE and some RELATIVE as shown below in the source code: <a href="example.com/get-started.html"> <a href="/contact-us.html"> The "/contact-us.html" will end up at "example.com/contact-us.html" but in the source code it reflects /contact-us.html rather than the full URL. Is this bad for SEO purposes? – user3330299 Jul 10 '17 at 3:47
  • It's all good from SEO side. You can have absolute or relative. If your link says href="contact-us.html" or href="example.com/contact-us.html". It will work fine and there is no SEO issue with this. – TopQnA Jul 10 '17 at 3:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.