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
-
Indexation and visibility problem
Hi I am working on a website (usarrestsearch org) for 6 months. I wrote about 100 pages full of good content. for some reason I see only 75% of the pages indexed in GWT. and Im having problems with SERP positions not rising. I suspect that it might be connected to the structure of the site. will appreciate any help thanks
Technical SEO | | holdportals0 -
Self referencing canonicals AND duplicate URLs. Have I set them up correctly?
Hi team, We've recently redesigned our website. Originally we had separate product listings for every product. Even if there was one design in two colours, each colour had its own listing. With the redesign we merged all of these identical products to help with duplicate content. Customers can now browse the different stone colours available in that design from a single product listing (bottom left of screen under 'select a stone' on a product page) When the customer changes the stone colour, the product images change to the new colour and its product code is appended to the end of the existing URL. eg: http://www.mountainjade.co.nz/necklaces/assorted-jades-open-koru-necklace-jc1725/ (original listing) http://www.mountainjade.co.nz/necklaces/assorted-jades-open-koru-necklace-jc1725/?sku=JC1725BL (black selected) We have the following self referencing canonicals on all product pages [current-page:url:absolute], yet MOZ is telling me I have alot of duplicate content on pages with the above example. Have I implemented the canonicals correctly? Is this why Moz is flagging the listings as duplicate?
Technical SEO | | Jacobsheehan0 -
Setting up a site with different extensions (.co.uk and .com)
hi i am setting up a new site but have bought two domains to cover those who may type the wrong version. So i have: regionwithchildren.co.uk and regionwithchildren.com i am just setting up both on my wordpress host with a coming soon page (to include social links and sign up form). but had a few questions: as the main site is .co.uk should i just set up a redirect from the .com to the .co.uk as the root folders on the two will be the same (regionwithchildren) i need to change one as host cant have two identical - what should i change the .com one to? any other considerations for this kind of set up would be much appreciated? thanks neil
Technical SEO | | neilhenderson0 -
Are thousands of 404s a problem?
An ecommerce site I work on has around 16,000 URLs that are 404s in Webmaster Tools. The vast majority are for products that are no longer stocked by the site, which is a natural occurrence in ecommerce. But my question is, could these possibly be harming rankings?
Technical SEO | | creativemay1 -
After fixing duplicate pages problem - keyword rankings have fallen off a cliff!
We have recently signed up to SEOMOZ and found that our site had over 2,500 duplicated pages. We reported it the the web designer and they found links on the website to an old prototype version of the website and so they did a SQL run to get rid of them. Doing this got rid of 90% of them. However, this morning, moz has just done another crawl of our website and our keyword rankings have fallen off a cliff. Particularly, important one that we were at position 1 for. We are now on the fifth page. Can anyone shed any light on it? Will this be temporary? Thanks Stuart
Technical SEO | | Stuart260 -
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 -
Irrelevant Subfolders?
I have my root domain and as I am a web designer, I use subfolders as sandboxes for client websites. I would not like these to be searched though because they are just demos, ideas and such. Would this be a robots.txt matter or can I have SEOMoz wok with a campaign where I can exclude subfolders? Thank you in advance! : )
Technical SEO | | Blobe0 -
Can URL re writes fix the problem of critical content too deep in a sites structure?
Good morning from Wetherby UK 🙂 Ok imagine this scenario. You ask the developers to design a site where "offices to let" is on level two of a sites hierachy and so the URL would look like this: http://www.sandersonweatherall.co.uk/office-to-let. But Yikes when it goes live it ends up like this: http://www.sandersonweatherall.co.uk...s/residential/office-to-let Is a fix to this a URL re - write? Or is the only fix relocating the office to let content further up the site structure? Any insights welcome 🙂
Technical SEO | | Nightwing0