Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've recently been adding some backlinks to other articles within my site. I don't know if it's this that is now causing me a problem. I now notice that Google has indexed my sites pages again but this time all the URL's to content pages have the domain name twice in the URL of the page.

For example I am seeing these type of URLs; http://www.questbg.com/www.questbg.com/...-blog.html The article will then display on the home page underneath the frontpage module etc.

If I type in the correct URL; http:www.questbg.com/lifestyle/957-blog.html then the page displays correctly but Google (and Bing) have now changed all my URLs to the double domain type. My sitemap displays all the correct URLs with none of the wrong ones.

share|improve this question

migrated from stackoverflow.com Jul 27 '13 at 13:24

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

Hmm- I'm not entirely sure why google would pick up your domain like that. If I had to guess, maybe on your website you're not using an http:// in front of your links, so it is trying to link to individual pages with the whole URL.

To fix your current problem, I would use a 301 redirect to show google that those URLs have been permanently moved to the right location. A 301 redirect goes in your .htaccess file and looks like this:

redirect 301 /old-wrong-name/ http:www.siteurl.com/correct-name

So yours might look like

redirect 301 /www.questbg.com/ http:www.questbg.com/lifestyle/957-blog.html 
share|improve this answer
    
Thanks, would I have to do this for each article as I have over 1600? –  joombg Jul 23 '13 at 14:14
    
The strange thing is that I have added only a few links to just 7-8 articles yet almost all of my articles indexed in Google and Bing show the duplicated domain in the URL's. My site runs on Joomla 2.5 if that is of any help. Another thing I notice is that when I add the links (I use JCE Editor) I then check the source code of the article and the link shows the <a href=" without the http: inside, is that normal for internal links? –  joombg Jul 23 '13 at 14:20
    
As far as I know, with .htaccess 301 redirects you have to manually do this. I think you should definitely get down to the root of why google is indexing your site tise way. –  zachwills Jul 23 '13 at 14:24
    
And for your internal link question, what does the full example href look like in your editor? –  zachwills Jul 23 '13 at 14:24
    
In the editor I paste in the full URL but the editor then removes the www...... –  joombg Jul 23 '13 at 14:28
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.