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).
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
-
Sitemap use for very large forum-based community site
I work on a very large site with two main types of content, static landing pages for products, and a forum & blogs (user created) under each product. Site has maybe 500k - 1 million pages. We do not have a sitemap at this time.
Technical SEO | | CommManager
Currently our SEO discoverability in general is good, Google is indexing new forum threads within 1-5 days roughly. Some of the "static" landing pages for our smaller, less visited products however do not have great SEO.
Question is, could our SEO be improved by creating a sitemap, and if so, how could it be implemented? I see a few ways to go about it: Sitemap includes "static" product category landing pages only - i.e., the product home pages, the forum landing pages, and blog list pages. This would probably end up being 100-200 URLs. Sitemap contains the above but is also dynamically updated with new threads & blog posts. Option 2 seems like it would mean the sitemap is unmanageably long (hundreds of thousands of forum URLs). Would a crawler even parse something that size? Or with Option 1, could it cause our organically ranked pages to change ranking due to Google re-prioritizing the pages within the sitemap?
Not a lot of information out there on this topic, appreciate any input. Thanks in advance.0 -
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 -
Redirecting root domain to a page based on user login
We have our main URL redirecting non-logged in users to a specific page and logged in users are directed to their dashboard when going to the main URL. We find this to be the most user-friendly, however, this is all being picked up as a 302 redirect. I am trying to advise on the ideal way to accomplish this, but I am not having much luck in my search for information. I believe we are going to put a true homepage at the root domain and simply redirect logged in users as usual when they hit the URL, but I'm still concerned this will cause issues with Google and other search engines. Anyone have experience with domains that need to work in this manner? Thank you! Anna
Technical SEO | | annalytical0 -
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 -
Duplicate Content based on www.www
In trying to knock down the most common errors on our site, we've noticed we do have an issue with dupicate content; however, most of the duplicate content errors are due to our site being indexed with www.www and not just www. I am perplexed as to how this is happening. Searching through IIS, I see nothing that would be causing this, and we have no hostname records setup that are www.www. Does anyone know of any other things that may cause this and how we can go about remedying it?
Technical SEO | | CredA0 -
Www or not www base url
Here is the situation. Developer custom coded a magento commerce shop for a seo client and is having problems adding www to the URL without breaking the site. They wont be able to get this completed until a couple months down the road. We are starting monthly SEO this June. Most directories and websites link to the www version of a site not the non www. What should I expect since we are ranking for the non-www and linking to the www version. In web master tools i'm telling google to display the URL as www.
Technical SEO | | waqid0 -
Schema.org microformatting - itemprop within href tag?
I'm trying to implement microformatting on the site, specifically for the cities where we are active. I'm hoping this will help us rank in local search. This is what I have been doing: op="addressLocality">City Name In Google's Rich Snippets Testing Tool, that yields this: addresslocality = City Name However, I've also done this: City Name In Google's tool, that gave me this: addresslocality text = City Name
Technical SEO | | ufmedia
href = http://www.domain.com/webpage So which is better?0