Wordpress & trailing slash on domain name
-
Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as
but since moving to wordpress my domain is now having a slash put on the end of it like
Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?
If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)
Thanks
T
-
Takeshi, that was great thank you
-
Try this:
<code># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule (.+)/$ $1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] IfModule></code>
-
Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on
RewriteBase /newsite/ or do I have to strip out a few more?
Don't like messing with my hataccess so any help to point me in the right direction would be great!
# BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /newsite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /newsite/index.php [L]</ifmodule> # END WordPress
-
Good point!
Just checked and www.domain.co.uk redirects to www.domain.co.uk/
This a htaccess issue perhaps?
-
Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?
-
Self hosted!
I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site
-
Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.
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
-
How can I outrank a website whose brand is named specifically after a product / service (and mine is not!) ?
Hi everyone, I've been working hard on my on-page SEO lately so I can gain visibility for my website. The results have been great and I am now on top of the SERP for the services I propose. I think that my content is almost fully optimize and** I've respected all the best practices (both on-page and technical SEO)**. However, there is one problem I just can't deal with for I don't have the knowledge, hence this post. I'm pretty sure that this issue is quite common for SEO experts. Here the thing: I offer dental emergency services, which is my core business. I'm ranked 4th for that request in my area, which is good, but I'd like to rank 1st as** I have a better DA and content than the 3 websites outranking me**. Also, I'm the first result for any other related services such as "dental services" or "dentist". However, when it comes to the theme "dental emergency", I'm constantly outranked by the same 3 websites. I ran an audit on their website but **my content and technical SEO is way better **than theirs. I suppose that the only reason I'm behind them is because they used "dental emergency" in their **Brand name **and, therefore, in the Home page URL. Every time someone is looking up online for "dental emergency", these websites will be on top of the SERP as I think that Google is unable to know whether the users are specifically looking for their websites (aka Brand) or for "dental emergency" services. Here is an example of a competitor: https://www.urgencedentairedemontreal.com/ (urgence meaning emergency in French). His whole Brand name and URL have been built after the "dental emergency." service. On the contrary, **my Brand name does not mention "urgence". ** I see that as a trick that is confusing Google. The fact that my competitors named their Brand after a specific service I also offer is real pain for my SEO. I also think it's really unfair as I've put a lot of effort in designing a nice website with great UX and content. This is the kind of practice that should be penalized in my opinion. Please, does anyone know any way to resolve this issue?
On-Page Optimization | | AlexTL0 -
Category Pages are not Shown when searched for "brandname Category name"
Hi, Someone googled our brand name + category page name and our category page didn't showed up first so he says it's a bad job/thing. so help me to fix this. Googled "sepalika acid reflux" without quotes. Thank you.
On-Page Optimization | | Sepalika0 -
Is Brand name anchor text on a widget Spam
We have partial match penalty in WMT on one of our smaller sites. There are a few (less than 10) instances of widgets linking to us using our Brand Name as the anchor text. Would this fail a reconsideration request do you think? The widget links without the no-follow attribute.
On-Page Optimization | | Simonws0011 -
Magento Canonical & Default Robots Settings
Hello! I'm working with Magento 1.9 for an eCommerce site with several hundred products. Currently I understand it is best practices to use the Canonical tag, however I also have my default robots set to "Index, Follow". Will this cause an issue having product pages set to index, follow but also having a canonical tag included? What are some best practices regarding Magento default robots & canonical tags? Any help is appreciated.
On-Page Optimization | | BretDarby0 -
Help an SEO-DUMMY : ) Established hyphenated domain...redirect?!...new domain?!
Hello, everybody. I am definitely not an SEO specialist. My family owns a transportation business (since 2010) and i am the one responsible for the website (until we find a good SEO company). My question: Several years ago i did not know much about SEO and have chosen a domain name www.airporttransportation-limo.com (it is not the actual domain...just an example...i'm not sure if i can post the real website here) and another domain that is just the name of our company (it also has hyphen in it). Both websites are still doing good and we receive quite a bit of traffic, but i read more an more about how hyphenated domains and domains with more then two worlds can be bad for your SEO/business/traffic. I feel like the websites are stuck and not moving up any more..could that be because of the hyphens? I registered another domain that is the name of our company (which is well known by now) without any hyphens. Now i have no idea what to do. Should i redirect both old domains (old websites are different and do not have duplicate content) to the new one, or should i just redirect the old domain (just the name of our company with hyphen) to a new one (without hyphen) and leave the www.airportransportation-limo.com as is... Or maybe i should register another domain without any hyphens (two words only) and redirect the www.airporttransportation-limo.com to it... I am very nervous to make any changes and loose all the traffic. My family will kill me. Please help! I'm lost!
On-Page Optimization | | KL20140 -
"og:description" vs. name="description"
According to Rock Your SEO with Structured Social Sharing "OG description overrides meta description tag." Moz Crawl Diagnostics seems to ignore og:description and only look for meta name="description" - does that mean my meta descriptions tags should be meta name?
On-Page Optimization | | leighw0 -
Multiple domains vs single domain vs subdomains ?
I have a client that recently read an article that advised him to break up his website into various URL's that targeted specific products. It was supposed to be a solution to gain footing in an already competitive industry. So rather than company.com with various pages targeting his products, he'd end up having multiple smaller sites: companyClothing.com companyShoes.com Etc. The article stated that by structuring your website this way, you were more likely to gain ranking in Google by targeting these niche markets. I wanted to know if this article was based on any facts. Are there any benefits to creating a new website that targets a specific niche market versus as a section of pages on a main website? I then began looking into structuring each of these product areas into subdomains, but the data out there is not definitive as to how subdomains are viewed by Google and other search engines - more specifically how subdomains benefit (or not!) the primary domain. So, in general, when a business targets many products and services that cover a wide range - what is the best way to structure the delivery of this info: multiple domains, single domain with folders/categories, or subdomains? If single domain with folders/categories are not an option, how do subdomains stack up? Thanks in advance for your help/suggestions!
On-Page Optimization | | dgalassi0 -
What are all those meta name= and link rel= on the cnn home page source?
I usually use Description, title and keywords tag. I keep seeing these meta name = "classification" or "distribution" and also link rel =stylesheet" and "pingback" etc. Please tell me how important this is for SEO. It would be great to be pointed to the right page. Also, is there a wordpress pluggin to just fill in and have these be populated on the front end? Thank You
On-Page Optimization | | waspmobile0