Set base-href to subfolders - problems?
-
A customer is using the <base>-tag in an odd way:
<base href="http://domain.com/1.0.0/1/1/">
My own theory is that the subfolders are added as the root because of revision control.
CSS, images and internal links are used like this:
I ran a test with Xenu Link Sleuth and found many broken links on the site, but I can't say if it is due to the base-tag.
I have read that the base-tag may cause problems in some browsers, but is this usage of base-tag bad in some SEO-perspective? I have a lot of problems with this customer and I want to know if the base-tag is a part of it.
-
Hi Highland!
I know that relative URLs is anything but good, especially when you also use URL rewrite.
The only question is how Google will react to this?
Thanks for your answer!
-
Hi Cyrus and thanks for your answer!
The client is using the base tag on all pages on the site, but with different URLs. For example:
Root page: <base href="http://domain.com/1.0.1.0/2/1/">
Subpage:
<base href="http://domain.com/1.0.1.0/5/1/"> OR
<base href="http://domain.com/1.0.1.0/13/1/">Productpage:
<base href="http://domain.com/1.0.1.0/14/1/">As you can se they are using a lot of different base locations and unfortunately we are unable to change the base URL and test.
We have problems with both broken links and rankings. Whenever a new version of the system is created, all base URLs will be changed. This may mean that old links are still there and will be broken.
What do you think Cyrus, can this hurt us from a SEO perspective? It must be confusing for Google with all the strange base URLs?
I think the best would be to rebuild the structure and remove the base tag!
-
Most of the time you don't need to specify a base URL. The browser already knows this location. In some situations defining a base is helpful, such as mirrored sites when the URL used is not the same URL that is needed to resolve files.
Is your clients using a universal base tag that is the same across the entire site? I can't tell from the question, but this is a common situation that could potentially cause problems.
There's nothing inherently wrong with using a base tag. Most of the time, if you use it, you simply want to set it to the URL of the current page.That said, to avoid complications, the only time you really want to use the Base tag is when relative URLs wouldn't work without it.
You might want to test how the links on your site resolve and see if removing or modifying the base tag helps clear up your broken links.
-
Those are some sloppy URLs. I especially advise people to avoid the problems of relative paths in ANY URL. And, yes, <base> probably isn't helping.
Links starting with / are fine. That's the root of your site. Anything using "../" should be nixed and use a fixed path. And never, ever use "./".
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
-
Is having my homepage on a subfolder harmful?
Hi guys, I am the webmaster of the following two websites: www.gpblog.com/nl
Technical SEO | | NielsDE
www.gpblog.com/en The first URL is the Dutch version of GPBlog, the second URL is the UK version of GPblog. Whenever a person visits www.gpblog.com he gets redirected to either the Dutch version or the UK version based on his location. My question is: is it harmful to have 1. your homepage on a subfolder and 2. is it harmful to run two different languages on one domain using this technique? Thank you in advance!1 -
Https problem on google result.
Hello everyone. My problem is SSL certificate... Send all links to google, after google shows https link no problem. But a few minutes ago my home page link not have an SSL..
Technical SEO | | dalapayal
Please check this page : https://www.bodrumtransfermarket.com Where do I make a mistake? Thanks for all...0 -
Any problem with launching a redesigned site early without a few product categories?
Hello, My client wants to launch a redesign early, problem is they want to do this without a majority of their product pages, since the bulk of their sales aren't from these missing categories, will the resulting 404s hurt them? What is up, is the major pages structured around their primary keyword, most of their sales isn't from the product pages, but from the quotes turned into sales. Big ticket items aren't sold through the cart, they are call or email for quotes and normally those quotes are turned into sales once they realize the price is better. We will be adding these missing categories and products, just one section at a time. Since 404s don't hurt, and we don't rank very well from the products missing, should I be concerned about any thing else? Thank you
Technical SEO | | Deacyde0 -
301 Redirects in subfolders
Hi, we're making our site into a static site but I would like to transfer the Google juice. Most of the links and database exist on subfolders though. Could I simply do 301 redirects on the subfolders and retain the value or does it have to be on the full domain?
Technical SEO | | Therealmattyd0 -
Duplicate pages problem
The Moz report shows that I have 600 Duplicate pages, How can I locate the problem and how can I fix it?
Technical SEO | | Joseph-Green-SEO0 -
403 forbidden, are these a problem?
Hi I have just run a crawl test on screaming frog and it is showing quite a few 403 forbidden status codes. We are showing none of these in webmaster tools, is this an issue?
Technical SEO | | jtay1230 -
Including spatial location in URL structure. Does subfolder number and keyword order actually matter?
The SEOMoz On-Page report for my site brings up one warning (among others) that I find interesting: Minimal Subfolders in the URL My site deals with trails and courses for both races and general running. The structure for a trail is, for example: /trails/Canada/British-Columbia/Greater-Vancouver-Regional-District/Baden--Powell-Trail/trail/2 The structure for courses is: /course/28 In both cases, the id at the end is used for a database lookup. I'm considering an URL structure that would be: /trail/Baden-Powell-Trail/ca-bc-vancouver This would use the country code (CA) and sub-country code (BC) along with the short name for the region. This could be good because: it puts the main keyword first the URL is much shorter there are only 3 levels in the URL structure However, there is evidence, from Google's Matt Cutts, that the keyword order and URL structure don't matter in that way: See this post: http://www.seomoz.org/q/all-page-files-in-root-or-to-use-directories If Matt Cutts says they aren't so important then why are they listed in the SEOMoz On-Page Report? I'd prefer to use /trail/ca-bc-vancouver/Baden-Powell-Trail. I'll probably do a similar thing for courses. Is this a good idea? Thoughts? Many thanks, in advance, for your help. Cheers, Edward watch?v=l_A1iRY6XTM watch?v=gRzMhlFZz9I
Technical SEO | | esarge0 -
301 redirect .htaccess problem
Can anyone explain to me why this doesn't work? Redirect 301 /category/diamond-pendants/nstart/1/start/(.*) http://www.povada.com/category/pendants/nstart/1/start/$1 Im trying to replace everything after /start/ and insert it into the new url. Thanks in advance.
Technical SEO | | 13375auc30