Www redirect
-
I get the following message when I try to start a new campaign.
"We have detected that the domain www.shewula.nl and the domain shewula.nl both respond to web requests and do not redirect"
In the q&a I found answers to this problem and tried to fix it. No success yet.
This is what I have in my old ht.access file:
RewriteCond %{HTTP_HOST} ^www.shewula.nl$
RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/
RewriteRule (.*) /STICHTING_SHEWULA/$1 [last]
RewriteCond %{HTTP_HOST} ^shewula.nl$
RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/
RewriteRule (.*) /STICHTING_SHEWULA/$1 [last]
I changed it to ( got it from the answers
RewriteCond %{HTTP_HOST} ^shewula.nl
RewriteRule (.*) http://www.shewula.nl/$1 [R=301,L]This gave me a 500 internal error in the server header checker tool.
Does anybody know how I can fix this?
The website is in a folder in the root of my other website www.fastingfotografie.nl
Could this give me a problem?
Thanks.
Thomas
-
Thanks Valery. Your code is working too.
I can start with the campaign now.
Regards,
Thomas
-
Here's what you need:
RewriteCond %{HTTP_HOST} !^www.shewula.nl [NC]
RewriteRule ^(.*)$ http://www.shewula.nl/$1 [R=301,L]The 500 error is because you were not escaping the . in your regex on the first line.
The code here will only redirect if it doesn't have the www.
-
<code>``` <code>Your changed one is missing the wildcards. Unless I'm wrong, it would only</code>
<code>match 'shewula.nl' exactly, and not anything else.</code>
<code>This might work, but I'm just eyeballing it and am not good with regex:</code> ```</code>
<code>RewriteCond %{HTTP_HOST} !^(.).shewula.nl(.)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</code><code>edit-ugh stupid editor auto-inserting code blocks</code> ```
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
-
I am trying to better understand solving the duplicate content issues highlighted in your recent crawl report of our site - www.thehomesites.com.
Below are some of the urls highlighted as having duplicate content -
On-Page Optimization | | urahul
http://www.thehomesites.com/zip_details/76105
http://www.thehomesites.com/zip_details/44135
http://www.thehomesites.com/zip_details/75227
http://www.thehomesites.com/zip_details/94501 These are neighborhood reports generated for 4 different zip codes. We use a standard template to create these reports. What are some of the steps we can take to avoid these pages being categorized as duplicate content?0 -
How to do this 301 redirection
Hi there! I have two domains with the same content. Some guys in this forum posted that It would be convinient to do a 301 redirect from one ".com" domain to ".es" domain (my potential market). I just tried to set it up in the htaccess file but it dind't worked at all. Something like: redirect 301 http://wwww.domain.com http://www.domain.es I just configure in the webmaster tools the domain www.domain.com as preferred domain insted of http://domain.comThe same with the other domain. Any help? many thanks
On-Page Optimization | | juanmiguelcr0 -
Boatload of 301 Redirects Question
We have a client that came to us and they recently did a site makeover. Previously they had all their pages in root directory including 75+ spammy article pages. On their makeover, they moved all the article pages into a directory and added 301 redirects. In going over their site we noticed they have redundant articles, like an article on blue-marble-article.htm and blue-marbles-article.htm Playing on singular and plural with dulpicate content for most part with exception to making it plural. If they have 75 articles, Id say 1/3 are actually somewhat original content. I would like to 301 redirect 2/3's of the articles to better re-written article pages but that would add a whole lot more 301 redirects. We would then have a 301 redirect from root directory to article directory, then another 301 redirect from spam article to new re-written article. My question is, would this be too many redirects for googlebot to sort through and would it be too confusing or send bad signals? Or should I create a new directory with all good articles and just redirect the entire old articles directory to the new one? Or just delete the redirects and old spammy directory and let those fall on a 404 error page. Id hate to lose 50-75 pages but I think its in fact those spammy pages that could be why the site fell from top of first page google to third page and now 10th page in a years time. I know, Im confused just typing this out. Hope it makes sense for some good feedback and advise. Thanks.
On-Page Optimization | | anthonytjm0 -
Is this good practise for SEO: www.example.com/testing-once/testing-once.aspx?
My web developer is telling me that it is best practice for SEO to place your keyword in your URL twice. For Example: www.example.com/testing-once/testing-once.aspx. I'm sure that this is not true, could you please help?
On-Page Optimization | | CoGri0 -
Temporary redirect - help!
I ran an audit on a new clients website (they did a redesign and fell off of the radar). One of the major issues that the audit came back with was over 6,000 warnings for temporary re-directs. This is a large e-commerce site and I know there will be errors but wondering why the company who did the redesign wouldn't do a 301? Would someone be able to look at this code and tell me if what they did is correct? One of the many pages that has the temporary redirect: http://www.toyotapartsstore.com/index.php?route=checkout/cart&product_id=1 Where all the many pages with errors is redirecting to: http://www.toyotapartsstore.com/index.ph
On-Page Optimization | | KnopfBay0 -
Http://www.xxxx.com does not re-direct to http://xxx.com
When typing in my website URL www.earthsaverequipment.com successfully re-directs to earthsaverequipment.com as specified in robot. However if you type http://www.earthsaverequipment.com it brings up a 404 error Is this a potential issue? if so is there a way to fix it? thanks
On-Page Optimization | | Earthsaver0 -
301 redirects / clean urls
hello everyone, we moved our site to a new platform that has url rewrite feature. we are building out a spreadsheet of the old aspx urls and the corresponding page on the new site. my dev tells me that its not important to redirect the old page to the new "clean url" page which sounds a bit odd to me ..example below. okay. so he says its the same difference to 301 redirect this url: http://72.3.181.97/catalog/DesignerDogBeds.aspx to this urls: https://www.k9electronics.com/product.php?productid=3474 instead of this clean url: http://www.k9electronics.com/designer-dog-beds/ can anyone give me any feedback on this? thanks!
On-Page Optimization | | k9byron0 -
Redirect and page ranking
We used to have a good page rank of Google, but now our page rank dropped to zero. A few months ago we did a redirect from our www.???.com to non-www.???.com, because non-www.???.com is now our main website. We also have a number of other domains which we redirect to our main website non-www.???.com Do you think these redirects are causing the problem, and if so what can we do to fix it? Thanks!
On-Page Optimization | | poupette0