Base href
-
I'm having a discussion with a third party that's building a website for a client that I advised concerning his SEO.
The site went live 2 weeks ago and it's not getting indexed very well, so my client asked me what could be the problem.
I checked several things that could be the problem, like an xml sitemap that was missing etc. But there was another thing that I saw in the source code:
<base href="http://www.domain.com/">
Can this be a problem for Google to follow internal links? I always thought that you should use the base href like this:
<base href="http://www.domain.com"> so without the trailing / behind the TLD
And even better using absolute instead of relative links, no?
-
I suggest looking through previous Q&A forum results for various answers that have been provided for this question. Here's the query to find them: https://www.google.com/search?q=seomoz+base+href.
Basically, you are right, you should use absolute links instead of relative links. You only need to use a base href if you are using relative URLs on page and the base href is needed for them to resolve correctly.
The base href you are seeing in the code shouldn't be causing any issues for Google when following internal links. The issues, if any, would be caused by the relative links themselves if they are not set up correctly (this should be easily tested).
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Re: Auto Detection of Currency based on IP & Google SEO
Greetings to the fellow Moz community members! On an e-commerce site, I am using a script to change the default currency of storefront based on IP detection ( GBP for UK visitors, CAD for Canadian visitors and so on). My question is : can this create any problems at all in Google Crawling or Indexing? Will google be able to understand the setup? I don't think this should trigger the "cloaking" or presenting different content to search engines vs users, but just want to double check from the collective wisdom here. Thanks for reading, and wish you a good day ahead. Warm Regards Amit
Technical SEO | | amitgg0 -
What is the best way to redirect visitors to certain pages of your site based on their location?
One website I manage wants to redirect users to state specific pages based on their location. What is the best way to accomplish this? For example a user enters the through site.com but they are in Colorado so we want to direct them to site.com/colorado.
Technical SEO | | Firestarter-SEO0 -
Does using data-href="" work more effectively than href="" rel="nofollow"?
I've been looking at some bigger enterprise sites and noticed some of them used HTML like this: <a <="" span="">data-href="http://www.otherodmain.com/" class="nofollow" rel="nofollow" target="_blank"></a> <a <="" span="">Instead of a regular href="" Does using data-href and some javascript help with shaping internal links, rather than just using a strict nofollow?</a>
Technical SEO | | JDatSB0 -
Weird href - is it still a follow link?
On many publication sites I have noticed weird links like I have never seen before <a <="" span="">href="http://test.com" onclick="linkClick(this.href)">Test</a> Are these still follow links? Is the only thing that determines a no follow link "rel=nofollow"? So as long as the link doesn't have that, it's good to go? Why might they have used a link like this? For tracking?
Technical SEO | | BlueLinkERP0 -
Do knowledge base plugins on a subdomain have seo benefit?
Hi SEO Moz, We want to use a knowledge base plugin (cheaper & faster than building it ourselves) where we can have Q&As for our website. We want this to help with our SEO by adding in our keyterms that we want to rank for. We've looked into TenderApp & Get Satisfaction which look like good solutions - however, as they're both on a sub-domain do we get any seo benefit from this? When people link to our knowledge base, will this help our website at all - or is the benefit going to go to TenderApp/Get Satisfaction? For instance - Our website URL is http://widget.products.com The KB URL is http://widgetsupport.products.com If the above plugin is not a good solution, is there anything else that is better? Any help will be greatly appreciated!! Thanks.
Technical SEO | | qdigi0 -
Using differing calls to action based on IP address
Hi, We have an issue with a particular channel on a lead generation site where we have sales staff requiring different quality of leads in different parts of the country. In saturated markets they require a stricter lead qualification process than those in more challenging markets. To combat the problem I am toying with the idea of severing very slightly different content based on IP address. The main change in content would be in terms of calls to action and lead qualification processes. We would plan to have a "standard" version of the site for when IP location can not be detected. URLs on this version would be the rel="canonical" for the location specific pages. Is there a way to do this without creating duplicate content, cloaking or other such issues on the site? Any advice, theories or case studies would be greatly appreciated.
Technical SEO | | SEM-Freak1 -
302 vs. a href="nofollow"
we came across one thing the we did not asked to programm by our intention. we have a magento shop and on the produktpage we have those "compare" buttons. these link have a session id and the follow a 302 back onto the same page. so i beleive the idea is that google will just not follow 302s and thats it. so my questions is: is this right what we beleive if so why is a 302 better compared to a a href="nofollow" ???
Technical SEO | | kynop0 -
Is a redirect based on a session cookie hurting rankings?
My clients business is divided in chain stores. All stores are set under the same franchise. There is one domain www.company.com with branches like www.company.com/location1/content and www.company.com/location2/content etc. I've taken care of duplicate content issues with rel="canonical" and duplicate page titles are also not a concern, anymore. Right now the concept is like this: If you visit the site for the first time you get to choose between the locations. Then a cookie is set and once you revisit www.company.com it will redirect you via a php header command to the location stored in your cookie: www.company.com/location1/content. My question is if this might hurt rankings in some kind of way as these aren't permanent redirects with a 301 but rather individual ones, based on your cookie.
Technical SEO | | jfkorn0