1

I am looking into creating a web portal for my website. The web portal will be inside the directory of the main site and the web portal includes the navigation menu of the main site. e.g. the File paths will look like this:

Main Site -> /var/www/html/MySite
Web Portal -> /var/www/html/MySite/WebPortal

Inside the web portal I do the following which is included on every page:

require_once '/var/www/html/MySite/includes/navigation.php'

The web portal is accessed via virtual host where the document root is set to the web portal path, therefore the navigation menu of the main site can't work as its outside the document root.

Therefore I thought about making the change so each link on the main sites navigation page goes to via the full domain path, e.g. the menu will be

https://example.com/page1.htm
https://example.com/page2.htm

Instead of

/page1.htm
/page2.htm

Does using the full domain path instead of the relative path affect SEO, Search Rankings, such as Google Search or Google Analytics tracking data.

Thanks for any help you can provide.

2 Answers 2

5

What you're describing are absolute links (https://example.com/page1.htm) and relative links (/page1.htm).

It really doesn't make any difference for SEO or analytics.

The advantages/disadvantages of each approach are only significant when you move a website to a different location.

1
  • Thanks, I was trying to think of the proper name of absolute but couldn't think of it
    – Boardy
    Commented May 26, 2017 at 17:21
1

Browsers and search engine fulfill the URL with the rest of the data. If you use page1.html, on http://www.example.com/dir1/, they read a link for http://www.example.com/dir1/page1.html. If you use /page1.html, they read http://www.example.com/page1.html. And, if you use //www.example.com/page1.html, they read http://www.example.com/page1.html.

Problem with that? The first one, subdomains / subdirectories / another separation for sections and/or languages. Second, if you have your page on http / https, links force the user to go to one protocol and not continue on the already used one.

For SEO, there's better if you doesn't have duplicate content. That's is, if your page are on www.example.com and example.com, do a 301 redirect from one domain to another. On the another one, use links as you prefer. But, if you have two pages, for example, http://www.... and https://www...., use relative links always, except for the login page (always load login page on https if you can), and, also, use canonical meta for specify one protocol / domain as "principal".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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